ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sharing Variable Values Between Workbooks??? Any ideas? (https://www.excelbanter.com/excel-programming/274480-re-sharing-variable-values-between-workbooks-any-ideas.html)

BrianB

Sharing Variable Values Between Workbooks??? Any ideas?
 
I think you might need to be more specific about the problem you have.

The simple answer is something like =
=[Book1]Sheet1!$A$1
which (apart from typing)is achieved by putting an = sign into the
target cell, select the cell in the other workbook, press Enter.

Regards
BrianB
=================================================




"Rees" wrote in message ...
wow, having problems finding an answer to this problem.
Does anyone know if it can be done?

Any help greatly appreciated.

Rees


Tom Ogilvy

Sharing Variable Values Between Workbooks??? Any ideas?
 
pass it/them using the arguments for the sub in workbookB.

Public SubInB(A, B)
msgbox A & " - " & B
End Sub

in workbookA

Sub Test1()
C = ThisWorkbook.Name
D = 10000
Application.run "WorkbooksB.xls!SubInB", C, D
End Sub

--
Regards,
Tom Ogilvy


Rees Macleod wrote in message
...

Hi Brian,

Thanks for the reply. What I mean is actually passing a variable from
VBA. In other words, I want to pass say, variable1 and variable2 from a
Sub running in workbookA.xls to another Sub waiting in workbookB.xls, so
I can continue working with variable1 and variable2's values that were
established in workbookA.xls


Thanks again,

Rees


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





All times are GMT +1. The time now is 11:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com