vba - Getting error for : Application.Goto Workbooks("BOOK2.XLS").Sheets("Sheet1").Range("E4:F12") -
i getting run time error '9' script out of range when trying run code
application.goto workbooks("book2.xls").sheets("sheet1").range("e4:f12")
i using excel 2010. can see many users able use this code successfully, why not getting work? writing code in book1 , trying copy data book2:
sub copy() application.goto workbooks("book2.xls").sheets("sheet1").range("e4:f12")` end sub
you getting error because of 1 of reasons
- the worksbook not .xls file. check extension.
- the file opened in excel instance.
- there no workbook open name.
Comments
Post a Comment