I am trying to automate the transfer of data from one workbook (OrigWB) to another (DestWB) with the same structure but different code. I will instruct them to open both workbooks and select the OrigWB from a list in the new workbook (DestWB) :
So now I need to set the variables. I have tried, among other things:
Set DestWB = ThisWorkbook 'where the procedure resides
strName = DestWB.Worksheets("Resources").Range("C91") 'the cell with the name selected.
Set OrigWB = Workbooks("&strName&") 'get Subscript out of range error here.
Just need to set these. Probably something simple for you guys.
So now I need to set the variables. I have tried, among other things:
Set DestWB = ThisWorkbook 'where the procedure resides
strName = DestWB.Worksheets("Resources").Range("C91") 'the cell with the name selected.
Set OrigWB = Workbooks("&strName&") 'get Subscript out of range error here.
Just need to set these. Probably something simple for you guys.