Hi All,
I am writing a macro that starts in one workbook (who's file name will change weekly) and will also access a reference sheet on the network. The goal is to copy the reference sheet into the first workbook.
In order to do this I'm using the following code, but I am not getting past the Set CurMP line. Am I defining that variable incorrectly?
Thanks for your help!!!
Allen
Dim CurMP As Workbook
Set CurMP = Workbooks(ThisWorkbook)
Workbooks.Open Filename:= _
"G:\Ad Services\Analytics\FY11 Campaigns\FY11 Windows\Allen's Stuff\BigBrother\BigBrotherRefSheet.xlsx"
Sheets("Ref Sheet").Copy After:=Workbooks(CurMP).Sheets(1)
I am writing a macro that starts in one workbook (who's file name will change weekly) and will also access a reference sheet on the network. The goal is to copy the reference sheet into the first workbook.
In order to do this I'm using the following code, but I am not getting past the Set CurMP line. Am I defining that variable incorrectly?
Thanks for your help!!!
Allen
Dim CurMP As Workbook
Set CurMP = Workbooks(ThisWorkbook)
Workbooks.Open Filename:= _
"G:\Ad Services\Analytics\FY11 Campaigns\FY11 Windows\Allen's Stuff\BigBrother\BigBrotherRefSheet.xlsx"
Sheets("Ref Sheet").Copy After:=Workbooks(CurMP).Sheets(1)