Guys, by default Excel creates 3 empty sheets, how do I add 2 more to the end of them so I end with Sheet1, Sheet2, Sheet3, Sheet4 and Sheet5 in sequence?
TIA
FUNCTION MAIN()
LOCAL oExcel := CREATEOBJECT( "Excel.Application" )
LOCAL oSheet
oExcel:Workbooks:Add()
oSheet = oExcel:Sheets:Add( oExcel:Sheets[ oExcel:Sheets:Count ] )
oExcel:Sheets[ oExcel:Sheets:Count ]:Move( oSheet )
oSheet:Name = "Added"
oExcel:Visible = .T.
RETURN NIL
oExcel:Sheets:Add(, oExcel:Sheets[ oExcel:Sheets:Count() ], 2 )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 95 guests