View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Sharing Variable Values Between Workbooks??? Any ideas?

pass it/them using the arguments for the sub in workbookB.

Public SubInB(A, B)
msgbox A & " - " & B
End Sub

in workbookA

Sub Test1()
C = ThisWorkbook.Name
D = 10000
Application.run "WorkbooksB.xls!SubInB", C, D
End Sub

--
Regards,
Tom Ogilvy


Rees Macleod wrote in message
...

Hi Brian,

Thanks for the reply. What I mean is actually passing a variable from
VBA. In other words, I want to pass say, variable1 and variable2 from a
Sub running in workbookA.xls to another Sub waiting in workbookB.xls, so
I can continue working with variable1 and variable2's values that were
established in workbookA.xls


Thanks again,

Rees


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!