Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I have to use many workbooks in my program and I want to set th name of my workbook once. How can I do that ? At this moment, I copy SetRefs in all modules and I run it at first but is it possible to do that once. thanks, Public wbBook1 As Workbook Public wbBook2 As Workbook Public wbBook4 As Workbook Public wbBook5 As Workbook Public Sub SetRefs() Dim ProjetActif As Variant, Projet As String Set wbBook1 = Workbooks("Repair_follow_up.xls") Set wbBook2 = Workbooks("Repairs.xls") Set wbBook4 = Workbooks("Clients.xls") wbBook1.Activate Sheets("Feuille Calcul").Select ProjetActif = Cells(3, 5) Projet = ProjetActif & "_" & "Repair.xls" Set wbBook5 = Workbooks(Projet) End Su -- zapatista6 ----------------------------------------------------------------------- zapatista66's Profile: http://www.excelforum.com/member.php...fo&userid=1195 View this thread: http://www.excelforum.com/showthread.php?threadid=47192 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Declare and Set Public variables | Excel Discussion (Misc queries) | |||
How to declare variable as public. | Excel Programming | |||
PUBLIC DECLARE | Excel Programming | |||
To declare or not to declare | Excel Programming | |||
Declare variable as what? | Excel Programming |