Run a Macro

E

ED

I managed to record a macro. It is about 5 lines long.
I would like to run it whereever I need it. However I can only run it in
the same cell each time. How would I change this? Thank you.
 
C

CLR

You can create a Drawing Object, such as a rectangle, or circle, etc using
the Drawing Toolbar....then Right-click on the object and select "Assign
macro" from the dropdown, and then select your macro from the window and
click OK.......next time you can run the macro just by clicking on the
object........

hth
Vaya con Dios,
Chuck, CABGx3
 
S

Sloth

Post the code.

You probably have a line before the change like

Range("B2").Select

which should be deleted.

Or you have a piece of code like

Range("B2").FormulaR1C1 = "abc"

which needs to be changed to

ActiveCell.FormulaR1C1 = "abc"

If it's not these, then post your code.
 
Top