Move excel sheets

Post Reply
User avatar
César E. Lozada
Posts: 128
Joined: Wed Oct 26, 2005 12:18 pm
Location: Los Teques, Miranda, Venezuela

Move excel sheets

Post 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.
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Move excel sheets

Post 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

oExcel:Sheets( "Sheet1" ):Select()
oExcel:Sheets( "Sheet1" ):Move( , oExcel:Sheets( 3 ) )
EMG
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Post 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
Post Reply