Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Naming objects

Status
Not open for further replies.

caerdydd

Programmer
Mar 2, 2004
35
GB
Hi Guys,
I have basic line of code

itemid1.bringtofront
end sub

This brings itemid1 to front when double clicked, but i have itemid2, itemid3 and so on. How can i give all these objects a generic name so that when i double click any item it brings it to the front.

Grateful for the help
 
Application? Version?

Generic names are not a good idea, and I am not sure it can be done anyway. Each object is individual, therefore has a unique name.

However, you could do a loop through all shapes.

Say, in Word (and again, you do not state application or version), and more importantly, you do not state what these "items" are. ActiveX image controls, checkboxes, those awful "textboxes" fro, Insert > Textbox - of what?

In any case , most likely what you are looking for is the ZOrder property.

With ActiveDocument.InlineShapes("ThisOne")
.ZOrder msoBringToFront
End With




Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top