Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I tried
local_Var = [Book2.xls]gb_To_Be_Read_From_Outside from Book1.xls I know it looks stupid, but need some way to do it, please help. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
in the book with the variable, in a general module (in this case, Book2.xls)
Public MVar as Variant ' Place holder sub InitMyVar() MyVar = int(rnd()*1000+1) End Sub Function ReturnMyVar() ReturnMyVar = Myvar End function Myvar should be initialized or assigned a value some how - assume that is taken care off To get the value, localVar = Application.Run("Book2.xls!ReturnMyVar") -- Regards, Tom Ogilvy " wrote: I tried local_Var = [Book2.xls]gb_To_Be_Read_From_Outside from Book1.xls I know it looks stupid, but need some way to do it, please help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I access the printer variable "number of copies"? | Excel Worksheet Functions | |||
How do I stop "global" hyperlinks changing to "local" links? | Excel Worksheet Functions | |||
use variable in Workbooks("book1").Worksheets("sheet1").Range("a1" | Excel Programming | |||
VBA code to create "variable" worksheets within a workbook | Excel Programming | |||
Urgently need VB Help - Declaring "Global" Variable? | Excel Programming |