View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff Harald Staff is offline
external usenet poster
 
Posts: 1,327
Default pass argument to macro

Sure. Include what you want inside its parentheses:

Sub test()
Call ")
Call ")
End Sub

Sub emailer(ToWhom As String)
MsgBox "mailing to " & ToWhom
End Sub


HTH. Best wishes Harald

"tommy" skrev i melding
...
i have an application that wrote and i need to pass a string
representing an email address to my macro so it knows who to send to,
can you pass an argument to a macro?