Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Sending a variable to another workbook?

I've inherited a pretty extensive VBA app in Excel 2003. It uses a "router" workbook to open alternative versions of a workbook containing the code. Now there's a need to add a custom Help menu, and the links/paths used in that menu should be sent from the router workbook, while the menus themselves are constructed in the code workbook. The router file creates a Workbook object of the code file, but I haven't figured out a way to use that to transfer the data. Any ideas?

Gustaf
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Sending a variable to another workbook?

Gustaf,

Of course, the code that you would need depends on where you are saving the data the needs to
accessed, but usually values are stored in cells:

Dim myB As Workbook
Dim myS As Worksheet
Dim myV As String

Set myB = Workbooks("CodeFile.xls")
Set myS = myB.Sheets("Storage Values")
myV = myS.Range("A1").Value


HTH,
Bernie
MS Excel MVP


"Gustaf" wrote in message ...
I've inherited a pretty extensive VBA app in Excel 2003. It uses a "router" workbook to open
alternative versions of a workbook containing the code. Now there's a need to add a custom Help
menu, and the links/paths used in that menu should be sent from the router workbook, while the
menus themselves are constructed in the code workbook. The router file creates a Workbook object
of the code file, but I haven't figured out a way to use that to transfer the data. Any ideas?

Gustaf



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Sending a variable to another workbook?

Bernie Deitrick wrote:

Of course, the code that you would need depends on where you are saving the data the needs to
accessed, but usually values are stored in cells:


Thank you. I've considered this solution, but the data is not really meant to be displayed in Excel, so it's not ideal. What I'm looking for is a way of changing the value of global variables inside workbook, and use that when building the menus. But thank you anyway. It may come in use.

Gustaf
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Sending a variable to another workbook?


Gustaf,

Can you describe how you would find the value for your global variable?

What I'm looking for is a way of changing the value of global variables inside workbook, and use
that when building the menus.


If you can put it into words, then we can put it into code.

HTH,
Bernie
MS Excel MVP


"Gustaf" wrote in message ...
Bernie Deitrick wrote:

Of course, the code that you would need depends on where you are saving the data the needs to
accessed, but usually values are stored in cells:


Thank you. I've considered this solution, but the data is not really meant to be displayed in
Excel, so it's not ideal. What I'm looking for is a way of changing the value of global variables
inside workbook, and use that when building the menus. But thank you anyway. It may come in use.

Gustaf



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
Sendkeys, sending variable Brent Excel Programming 1 May 17th 07 03:25 AM
Sending Workbook Noemi Excel Programming 1 September 11th 06 07:58 AM
Sending Variable Via E-Mail Chuckles123[_122_] Excel Programming 4 July 27th 06 01:28 AM
sending only one sheet from a workbook Alex Excel Programming 1 February 27th 05 09:15 PM
Sending variable data to a web site to be computed then brought back to Excel David Excel Programming 0 April 27th 04 09:44 AM


All times are GMT +1. The time now is 12:27 AM.

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"