To opem the secod workbook, run a pprocedure in the second workkbook and
pass it a parametric value, try somethinh like:
'============>>
Public Sub Tester()
Application.Run "'OtherBook.xls'!Demo", "Hello"
End Sub
'<<============
Where the second workbook has a procedure like:
'=============>>
Public Sub Demo(sStr As String)
MsgBox sStr
End Sub
'<<=============
Running the procedure Tester in the first workbook,
the second workbook will be opened (if it is closed)
and its Demo procedure will run and will report the
value of the passed parameter - in this case the string
"Hello".
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.