View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mihai[_5_] mihai[_5_] is offline
external usenet poster
 
Posts: 1
Default Error when moving sheet


Hi

I have this code for moving a sheet:

Workbooks.Open Filename:=a & "situatie_qsar.xls"
Workbooks.Open Filename:=a & "situatie_qsar_z.xls"
Sheets("situatie_qsar_z").Move
After:=Workbooks("situatie_qsar.xls").Sheets(1)

At the thired line I recive this error:
Run time error 9: Subscript out of range

Why?
The two files are exported from a program in "Microsoft Excel 2.1
Worksheet" format and I'm using Excel 2000.


--
mihai
------------------------------------------------------------------------
mihai's Profile: http://www.excelforum.com/member.php...fo&userid=2808
View this thread: http://www.excelforum.com/showthread...hreadid=276607