Page 1 of 1

Move excel sheets

PostPosted: Wed May 24, 2006 8:44 pm
by César E. Lozada
Hi,

Anybody knows what's the traduction of this macro from VB to xH/FWH?


Sheets("Sheet1").Select
Sheets("Sheet1").Move After:=Sheets(3)


Thanks a lot.

Re: Move excel sheets

PostPosted: Wed May 24, 2006 8:59 pm
by Enrico Maria Giordano
César E. Lozada wrote:Hi,

Anybody knows what's the traduction of this macro from VB to xH/FWH?


Sheets("Sheet1").Select
Sheets("Sheet1").Move After:=Sheets(3)


Thanks a lot.


Try

Code: Select all  Expand view
oExcel:Sheets( "Sheet1" ):Select()
oExcel:Sheets( "Sheet1" ):Move( , oExcel:Sheets( 3 ) )


EMG

PostPosted: Thu May 25, 2006 10:34 pm
by Jeff Barnes
You should also be able to do this:

oSheet := oExcel:Sheets(“oSheet1”)
oExcel:Sheets( "oSheet2” ):Move( oSheet )

This example will move sheet2 infront of sheet1


Jeff