Hi everybody,
Trying unsuccessfully to find the correct syntax to move a sheet in excel through OLE. (PB 8.02 with WXP pro.)
Code which is ok:
----------------
xlapp.Application.ActiveWorkbook.Worksheets.Add
xlapp.Application.ActiveWorkbook.Worksheets("sheet1").Name = "last"
xlsub = xlapp.Application.ActiveWorkbook.Worksheets("last")
Code not ok:
-----------------
xlsub.move ("After:=Sheets(3)")
( the macro code in excel is [Sheets("last").Move After:=Sheets(3)], with space between Move and After. )
Error:
------------------
Error calling external function move at line 39 in clicked events of object cb_1 of w_main.
Can anybody help?
Thanks in advance.
Trying unsuccessfully to find the correct syntax to move a sheet in excel through OLE. (PB 8.02 with WXP pro.)
Code which is ok:
----------------
xlapp.Application.ActiveWorkbook.Worksheets.Add
xlapp.Application.ActiveWorkbook.Worksheets("sheet1").Name = "last"
xlsub = xlapp.Application.ActiveWorkbook.Worksheets("last")
Code not ok:
-----------------
xlsub.move ("After:=Sheets(3)")
( the macro code in excel is [Sheets("last").Move After:=Sheets(3)], with space between Move and After. )
Error:
------------------
Error calling external function move at line 39 in clicked events of object cb_1 of w_main.
Can anybody help?
Thanks in advance.