With the workbook name in B1 and worksheet name in B2 of active sheet. (I will have a second workbook and sheet in B3 and B4). I want to be able to choose those other workbooks so I can manipulate them. The workbooks will be open so don't need to worry about path.
Why doesn't this code work![]()
Sub test() Dim Wkbk1 As Workbook Dim WkSh1 As Sheets Set Wkbk1 = Workbooks(ActiveSheet.Range("B1").Value) Set WkSh1 = Sheets(ActiveSheet.Range("B2").Value) MsgBox (Wkbk1.WkSh1.Range("A1").Value) End Sub
Bookmarks