Open workbook and pass info

G

greg

Hello,
I an opening a file. and wondering if I can pass info to the workbook open?
so given this example:

My code:
Set objWB = Workbooks.Open("C:\foo\foo2\bla.xlt")

bla.xlt
Private Sub Workbook_Open()
End Sub

I would like to have some information right away in the workbook open.
is there a way to pass it in right away?
thanks
 
S

Sam Wilson

application.stausbar = "BlahBlahBlah"
Set objWB = Workbooks.Open("C:\foo\foo2\bla.xlt")

And then:
Private Sub Workbook_Open()
msgbox application.statusbar
End Sub

could work
 
G

greg

thanks,
Seems to work on my first test.


Sam Wilson said:
application.stausbar = "BlahBlahBlah"
Set objWB = Workbooks.Open("C:\foo\foo2\bla.xlt")

And then:
Private Sub Workbook_Open()
msgbox application.statusbar
End Sub

could work
 
S

Sam Wilson

Good news. Can you mark it right so that any other users searching for a
similar problem can find help?

Sam
 

Ask a Question

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.

Ask a Question

Top