Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to Reference Global Variable for external application.

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to Reference Global Variable for external application.

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to Reference Global Variable for external application.

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default How to Reference Global Variable for external application.

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to Reference Global Variable for external application.

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Global Variable dhstein Excel Discussion (Misc queries) 4 July 26th 09 05:10 PM
External reference with variable workbook name? KenV New Users to Excel 4 February 10th 06 09:48 PM
Create an external reference link with embedded variable Greentree Excel Worksheet Functions 1 October 9th 05 07:46 PM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
Global variable Don[_11_] Excel Programming 1 October 28th 03 04:15 AM


All times are GMT +1. The time now is 01:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"