come back to macro

  • Thread starter Thread starter Lee
  • Start date Start date
L

Lee

How to instruct a command button (when it's placed) to go
to a specific location in a macro (say "macro1")
associated with a different sheet (say "Sheet1") so the
execution can continue in macro1? thanks.
 
i have no idea what your asking to do, please try to explain better. do you wan to rereun the macro again? do you want to associate a command button with a macro? do you want to start the macro at a specific line of that macro?...what
 
To my knowledge you can not call a macro on a sheet moudule unless yo
are calling it from another macro on the same sheet module
 
If you make it public you can. (preface it with the "module" name).
 
Tom


Everytime I have tried to declare a macro as public on a sheet modul
in the past I always get a error message sub or function not define
when trying to call it from another sheet.

I use Excel 97

Can you enlighten me as to why this might be occuring

thanks

mudrake
 
Sheet7 has a commandbutton (commandbutton1)

Private Sub CommandButton1_Click()
Sheet8.cb1_Click
End Sub

Sheet8 has a commandbutton (cb_1)

Public Sub cb1_Click()
MsgBox Me.Name & " - " & "cb1_click"
End Sub


Clicked commandbutton1 on Sheet7 and got the msgbox sheet8 - cb1_click

Worked fine for me in Excel 97 SR2.
 
Tom

I did not realize that I needed to precede the macro name with th
sheet name.

Thank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top