Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Zapatista66,
You're almost there. In your Workbook_Open procedure call another public procedure that I call SetRefs. SetRefs has all of your Set statements and you make the all of the objects global in scope. Then your other procs will see the objects. Also, while testing a procedure, throw SetRefs into the top of the procedure so when you get a runtime error you don't have to go look for Workbook_Open or SetRefs again. Just fix your code and F5. Geof. -----Original Message----- Hola Todos ! I need some help. I want to declare some variables for all my modules. Ex: Public wbBook1 as workbook, wbBook2, etc Set wbBook1 = workbooks("roger.xls") I don't want to write these lines in each modules. Want I start my principal workbook I open all workbooks needed in my programmation. After, I look in some workbook and I write in the other. thanks for helping me -- zapatista66 ---------------------------------------------------------- -------------- zapatista66's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=11956 View this thread: http://www.excelforum.com/showthread...hreadid=266983 . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Declare an Array() ???? | Excel Programming | |||
How to declare variable as Excel constant? | Excel Programming | |||
How do i declare a formula with prenamed variable | Excel Programming | |||
Best place to declare variables | Excel Programming | |||
declare type and value on one line? | Excel Programming |