Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have two workbooks. I want workbook A to set global module variables
in workbook B and direct B by calling its subroutines. Currently, workbook B sets the global variables with its Forms. The routines read the data files using the global variables. Andy Cross --- Message posted from http://www.ExcelForum.com/ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
create a reference in Workbook A to workbook B.
-- Regards, Tom Ogilvy "ajcross123 " wrote in message ... I have two workbooks. I want workbook A to set global module variables in workbook B and direct B by calling its subroutines. Currently, workbook B sets the global variables with its Forms. The routines read the data files using the global variables. Andy Cross --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom Ogilvy wrote:
[b]create a reference in Workbook A to workbook B. -- Regards, Tom Ogilvy huh?!? how do I do that? In VBA, I see this VBAProject (WorkbookA) +Microsoft Excel Objects +Modules +Module1 VBAProject (WorkbookB) +Microsoft Excel Objects +Modules +Module2 In Module2 has this global and this routine: Public filename As String Public Sub importFile Dim f as File End Su -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the VB Editor, go to the Tools menu, select References, and put a check
mark in front of the 2nd workbook (I believe it has to be open at this point). On Thu, 29 Jul 2004 12:40:11 -0500, ajcross123 wrote: Tom Ogilvy wrote: [b]create a reference in Workbook A to workbook B. -- Regards, Tom Ogilvy huh?!? how do I do that? In VBA, I see this VBAProject (WorkbookA) +Microsoft Excel Objects +Modules +Module1 VBAProject (WorkbookB) +Microsoft Excel Objects +Modules +Module2 In Module2 has this global and this routine: Public filename As String Public Sub importFile Dim f as File End Sub --- Message posted from http://www.ExcelForum.com/ |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hmm, now I am not getting by this error which doesn't give me a clue a
to what is conflicting: Name conflicts with existing module, project or object library. I tried renaming obvious conflicts. All that I can think of is tha both have "ThisWorkbook". On a different tack, I added routines to the other sheet. These ar executed with Application.Run and these can set that workbook' variables and call its subroutines. Thank you, though. Myrna Larson wrote: In the VB Editor, go to the Tools menu, select References, and put check mark in front of the 2nd workbook (I believe it has to be open a this point) -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Global Variable | Excel Discussion (Misc queries) | |||
External reference with variable workbook name? | New Users to Excel | |||
Create an external reference link with embedded variable | Excel Worksheet Functions | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions | |||
Global variable | Excel Programming |