View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
papou[_4_] papou[_4_] is offline
external usenet poster
 
Posts: 110
Default Running a macro from the spreadsheet

Hi Roger

Create a Sub in a standard module and then call your form from this sub.
eg:
Sub LaunchMyForm()
Load USerForm1
UserForm1.Show
End Sub

HTH
Cordially
Pascal

"Roger Withnell" a écrit dans le
message de news: ...
I have built a macro in VB for a particular spreadsheet, opening VB from
within Excel. The macro is in the Forms folder and double clicking the
button (that starts the macro) on the form opens the code window.

I can now run the macro successfully within the VB window, using the Run
Sub/Userform button. How do I initiate this macro from the spreadsheet
ToolsMacroMacros window? It is not listed there currently.

I would like to email this macro to my partner to use. Does it have to be
emailed with the spreadsheet in which it was built? I would rather it
were
possible to run it with any designated spreadsheet.

Thanking you in anticipation.