Reference already open 2nd workbook

KMKfan

Board Regular
Joined
Mar 8, 2004
Messages
106
I need help referring to an already opened 2nd workbook. Here's what I have.

The first workbook contains a listing of Excel files as hyperlinks.

Clicking a hyperlink opens a second workbook, which the user must evaluate and make changes.

After making changes, the user needs to send new data in the second workbook back to the first workbook (which is still open).

I am currently running the following macro from the 2nd workbook (the one that has the data I need to send to My_List)

Any solutions or alternative approaches?

Thanks

Code:
Sub Send_MyData()
Dim My_List As String
Dim wb1 As Workbook, wb2 As Workbook
Set wb2 = ThisWorkbook
My_List = wb1.Sheets("Summary").Range("QAList_Path").Text
Set wb1 = Workbooks(My_List).Activate 'Error occurs here

'Expected function or variable when using "Workbooks(My_List)"
'Subscript out of range when using "Windows(My_List)" where My_List is Fullname of workbook
'Object required when  using "Windows(My_List)" where My_List is Name of workbook


'Code to find correct record number
'Code to send info back to the original workbook

Set wb1 = Nothing
Set wb2 = Nothing

End Sub
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,224,616
Messages
6,179,911
Members
452,949
Latest member
beartooth91

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top