Marco Help

L

looper

Hello
I have a text box with an assigned macro. I want th run two macros off of
the button. Which macro runs will depend on the location of the active cell.
User will have two options. If cell A1 active, button will run macro a. If
cell B1 active, button will run macro b.

Tank you
 
E

excelent

assign ur button to macro "Butt"

Sub Butt()
If ActiveCell.Address = "$A$1" Then Call a
If ActiveCell.Address = "$B$1" Then Call b
End Sub

Sub a()
MsgBox ("") & ActiveCell.Address
End Sub

Sub b()
MsgBox ("") & ActiveCell.Address
End Sub


"looper" skrev:
 
Top