Assigning Macros to Objects

larper

Board Regular
Joined
Jan 13, 2005
Messages
66
I've looked and looked but I can't find either the keystroke on the Icon to put on the menu, to Assign Macro. I have to Right Click every object that I want to assign a macro to. I have made a layout map that I've overlaid with a clear object which I'm assigning a macro to pull up detail to that location...So I have 1000's to do this to....it would help is someone could tell me the Keystroke for "assign macro" or where the icon is so to place it in the control box....

Many Thanks!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
I am not to sure what the default keystoke is but i had a thought that you could perhaps record a macro which does just this for you and then assign your own key command to it. Would that help?
 
Upvote 0
You can assign a shortct key to this macro:

Code:
Sub Test()
    On Error Resume Next
    Application.Dialogs(xlDialogAssignToObject).Show
End Sub

Select the object then run the macro. I'm not sure it's any quickr than what you are already doing though.
 
Upvote 0
Wow! 1000's? There is probably a better way to go about this. For example, using application.caller or rangefrompoint.

Provide many more details. From what I have gathered, you have a gazillion objects drawn out which are overlayed with "something clear". :) Instead of assigning a macro to each object, you would be better off using a single procedure that determines the coords of your mouse and then running instructions based upon that information.

Tell me some more details about your project...
 
Upvote 0
Right Click....I have 6 warehouse that store apprx. 17,000 item in each. I have made a Map that shows the #'s of pick from each shelf location, and the are Color Formated.. So if there is a lot of travel to the rear of the warehouse the location becomes Red, and I want the user to be able to ID the activity in that location by pressing on the map, which has the 1st 4 location identifiers, like 214A, this is turn will go to the detail and pull up any location picks that begin with "214A"...I'm sure there is a better way and I more than willing to learn, but for right now, I've overlayed the location with an object and assign a macro to it...so 1000's of object and Macro's....

Thanks for any enlightenment!
 
Upvote 0
Larper. Can you post an example of your workbook or email it too me and allow me to attach it here for others to view. It sounds like an interesting problem but I don't understand enough to offer anything further...

tom@jantomsolutions.com
 
Upvote 0
I've looked and looked but I can't find either the keystroke on the Icon to put on the menu, to Assign Macro. I have to Right Click every object that I want to assign a macro to. I have made a layout map that I've overlaid with a clear object which I'm assigning a macro to pull up detail to that location...So I have 1000's to do this to....it would help is someone could tell me the Keystroke for "assign macro" or where the icon is so to place it in the control box....

Many Thanks!

After email, I can explain the problem a bit better for input from other board members.

The layout map = values in cells that represent physical locations in a warehouse. The OP is covering each location with a transparent shape or control and wishing to run a macro based upon the "cell" being clicked upon.
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,383
Members
448,956
Latest member
JPav

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top