Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
place the After line on the same line as the .Move command e.g. 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) Cheers JulieD "mihai" wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Subscript out of range in this case probably means that the sheet 'situatie_qsar_z' doesn't exist. mihai Wrote: 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. -- crispbd ------------------------------------------------------------------------ crispbd's Profile: http://www.excelforum.com/member.php...o&userid=10880 View this thread: http://www.excelforum.com/showthread...hreadid=276607 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
formula for moving information from one sheet to another sheet | Excel Discussion (Misc queries) | |||
Error moving from 2003 to 2007 | Excel Worksheet Functions | |||
moving from one sheet to another from a cell of a sheet | Excel Worksheet Functions | |||
Sumproduct and moving sheets between workbooks error | Excel Discussion (Misc queries) | |||
moving informatiion from one sheet to a total sheet | Excel Discussion (Misc queries) |