Using VBA routines in different files
Using VBA routines in different files
(OP)
I have set up a spreadsheet that contains legacy data used on a daily basis. I have another spreadsheet that is completed for each job and stored. I want to create a routine in the job specific file that will call(start) a routine in the legacy spreadsheet(file). Is this possible and if so how?
Thanks in advance for any help.
Thanks in advance for any help.





RE: Using VBA routines in different files
See Excel help for specifics.
RE: Using VBA routines in different files
RE: Using VBA routines in different files
Dim rngLegacyBook as Range
Set rngLegacyBook = Workbook("My Legacy Workbook").Worksheets("Sheet1").Range("A1")
After the Set statement is executed, you can refer to the Range object simply as rngLegacyBook.
For example, you can assign a value to A1 in the legacy workbook with:
rngLegacyBook.Value = 10
Have a great day!
Scott