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

  1. the worksbook not .xls file. check extension.
  2. the file opened in excel instance.
  3. there no workbook open name.

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -