Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to open a book with parameters
I have to open a book from another one and to pass to it somehow the value of
a variable. Is it possible with VBA? Thanks for helping me |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to open a book with parameters
Hi Daniel
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". --- Regards, Norman "Daniel" wrote in message ... I have to open a book from another one and to pass to it somehow the value of a variable. Is it possible with VBA? Thanks for helping me |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to open a book with parameters
Hi Norman:
Simple and clear. Great explanation. Thanks! "Norman Jones" wrote: Hi Daniel 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". --- Regards, Norman "Daniel" wrote in message ... I have to open a book from another one and to pass to it somehow the value of a variable. Is it possible with VBA? Thanks for helping me |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to open new book (workbook) with other | Excel Discussion (Misc queries) | |||
hyperlink to other sw(exe) and open with parameters | Excel Worksheet Functions | |||
Open Another Book | Excel Programming | |||
SHELL to open an application and pass parameters to it | Excel Programming | |||
Open book, check for macros, close book | Excel Programming |