N
nelsonchang
Hi,
I have the following code to create a new Excel
worksheet. But the default is create it before the active
sheet. And I want to change the behaviour to make it the
position right after the active sheet. Please advise how.
Set oXLApp = New Excel.Application
Set oXLWBook = oXLApp.Workbooks.Add
Set oXLWSheet = oXLWBook.Worksheets("Sheet1")
'
oXLWBook.Sheet.Add
'
Set oXLWSheet = oXLWBook.ActiveSheet
oXLWSheet.Name = "S" + Str(SheetNo)
Thanks
I have the following code to create a new Excel
worksheet. But the default is create it before the active
sheet. And I want to change the behaviour to make it the
position right after the active sheet. Please advise how.
Set oXLApp = New Excel.Application
Set oXLWBook = oXLApp.Workbooks.Add
Set oXLWSheet = oXLWBook.Worksheets("Sheet1")
'
oXLWBook.Sheet.Add
'
Set oXLWSheet = oXLWBook.ActiveSheet
oXLWSheet.Name = "S" + Str(SheetNo)
Thanks