Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all!
I'm programming in Excel as a hobby, and I made a macro which draws several objects. These objects represent loaded cargo on the ship I'm sailing. When I want to change the place of these objects, I have to start a seperate macro. I can do that by clicking on the object itself, but how can I let the macro know on which object I'm clicking? (the objects all have a name such as object1, object2 and so on) Better still would it be to be able to shift the objects by mouse, but then how does the Macro know which object I'm shifting and where to? I hope this explanation was clear enough, and that someone has a solution. Someone here came with the idea of: Application.Caller but this does not give the wanted solution; it gives always "object" while I want to know the name of the object. I hope someone can help me further. Greetz, Jzz |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jzz,
If you used shapes from the Drawing toolbar, then Application.Caller should return the name of the shape (eg, "Rectangle 1"). At least it does for me. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Jzz wrote: Hi all! I'm programming in Excel as a hobby, and I made a macro which draws several objects. These objects represent loaded cargo on the ship I'm sailing. When I want to change the place of these objects, I have to start a seperate macro. I can do that by clicking on the object itself, but how can I let the macro know on which object I'm clicking? (the objects all have a name such as object1, object2 and so on) Better still would it be to be able to shift the objects by mouse, but then how does the Macro know which object I'm shifting and where to? I hope this explanation was clear enough, and that someone has a solution. Someone here came with the idea of: Application.Caller but this does not give the wanted solution; it gives always "object" while I want to know the name of the object. I hope someone can help me further. Greetz, Jzz |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ah yes!
Now I see what went wrong; the object was part of a group of objects. You can assign a macro to the group, but application.caller simply identifies the seperate objects; not the group. Many thanks! Jzz |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Identifying | Excel Discussion (Misc queries) | |||
Identifying Objects | Excel Programming | |||
Dynamically Assign Objects to Form Objects. | Excel Programming | |||
Identifying a value | Excel Programming | |||
Unable to remove Sheet objects in the Microsoft Excel Objects | Excel Programming |