View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Robert Martim, Excel Robert Martim, Excel is offline
external usenet poster
 
Posts: 20
Default Editing a macro which is within another macro.

Tom

If xyz is a variable you might just change its value to something else while
calling the second macro. For example:

Sub Macro1()
Dim abc As String
abc = "Hello world!"
Call Macro2(abc)
End Sub

Sub Macro2(ByVal xyz As String)
MsgBox xyz
End Sub

--
Best regards
Robert, Excel MVP
Author of RibbonX: Customizing the Office 2007 Ribbon:
Find me at http://www.msofficegurus.com - be part of it!
FORUM: http://www.msofficegurus.com/forum/