ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open workbook and pass info (https://www.excelbanter.com/excel-programming/412656-open-workbook-pass-info.html)

greg

Open workbook and pass info
 
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



Sam Wilson

Open workbook and pass info
 
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

"greg" wrote:

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




greg

Open workbook and pass info
 
thanks,
Seems to work on my first test.


"Sam Wilson" wrote in message
...
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

"greg" wrote:

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






Sam Wilson

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

Sam


"greg" wrote:

thanks,
Seems to work on my first test.


"Sam Wilson" wrote in message
...
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

"greg" wrote:

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








All times are GMT +1. The time now is 06:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com