L
Legacy 93538
Guest
Hi
I have written a macro in VBA which should open two documents and copies data from A2:A1000 to B3:B2000
However every time i run it i get a Compile Error saying Variable not defined. Can anyone tell me why i am getting it?
Thanks
JessicaSeymour
I have written a macro in VBA which should open two documents and copies data from A2:A1000 to B3:B2000
Code:
Option Explicit
Sub AverageGraph()
Application.Workbooks.Open ("C:\Documents and Settings\SeymourJ\Desktop\Book1Template.xlsx")
Application.Workbooks.Open ("C:\Documents and Settings\SeymourJ\Desktop\Actual_Participation_02_2011.xls")
Actual_Participation_02_2011.Sheet(1).Range("A2:A1000").Value = Book1Template.xlsx.Sheet("Graphings").Range("B3").Value
End Sub
However every time i run it i get a Compile Error saying Variable not defined. Can anyone tell me why i am getting it?
Thanks
JessicaSeymour