Hi All,
Have been searching the web for a solution to this problem but nothing working for me.
Basically I recorded a macro which copies cell values into another workbook. This runs fine as a stand alone marco but I have tried to add it to a larger piece of code which returns the error: 'select method of range class failed'
Debug highlights: Range("A2").Select
Any help appreciated.
Have been searching the web for a solution to this problem but nothing working for me.
Basically I recorded a macro which copies cell values into another workbook. This runs fine as a stand alone marco but I have tried to add it to a larger piece of code which returns the error: 'select method of range class failed'
Debug highlights: Range("A2").Select
Any help appreciated.
Code:
Sub Invoice_List()
'
' Invoice_List Macro
Range("A26:G26").Select
Selection.Copy
Workbooks.Open Filename:="C:\Users\Dell\Desktop\Acoustic Files\Web Booking Macro\Testing Invoice List.xlsx"
Worksheets("Invoices").Activate
Range("A2").Select
Rows("2:2").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWorkbook.Save
ActiveWindow.Close
End Sub