Hello i wanna copy just some specifics columns not all sheet i cannot get any info of that i writted this code and this code copy all columns and paste into new sheet its okey i need new sheets but i need select just specifics columns
Sub CopySheet
Dim oCurrentController As Object
Dim oActiveSheet As Object
Dim oSheets As Object
oCurrentController = ThisComponent.getCurrentController()
oActiveSheet = oCurrentController.getActiveSheet()
oSheets = ThisComponent.getSheets()
If oSheets.hasByName( oActiveSheet.Name & "Copy" ) Then
MsgBox "Sheet name " & oActiveSheet.Name & "Copy, already exists"
Else
oSheets.copyByName(oActiveSheet.Name, oActiveSheet.Name & "Copy", oActiveSheet.RangeAddress.Sheet + 1)
End If
End Sub
Tagging fixed by ajlittoz