Syntax
| XLS.MoveWorkSheet [shName, ][shBefore, ][shAfter]
| |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Description
| Reorders a worksheet in the tabs of the active workbook.
This method uses the standard Excel Move instruction for worksheet. A move instructions can only be accomplished by defining before or after which worksheet the moving worksheet must be placed.
Note: Either shBefore or shAfter must be a value assigned to. When both parameters have values assigned to, shAfter is ignored.
| |||||||||
See Also
| ||||||||||
Example
| Sub Main
Dim mySheets() As String
Dim x As Integer
If Not XLS.AppInit() Then Exit Sub
XLS.AppVisible = True
XLS.AddWorkBook
XLS.AddWorkSheet "Test1"
XLS.AddWorkSheet "Test2"
XLS.AddWorkSheet "Test3"
XLS.AddWorkSheet "Test4"
XLS.SaveWorkBook , "o:\AdminSQL\Scripts\mijntest.xlsx"
XLS.MoveWorkSheet , , "Test1"
XLS.ListWorkSheets mySheets()
For x = 1 To UBound(mySheets)
Debug.Print mySheets(x)
Next x
XLS.AppClose
End Sub
|