Im currently using this code to delete the cell contents in the active sheet. But im wondering what changes I should make so it will delete the contents in mutlipel sheets?
Sub SearchAndDoStuff3
Const needle = "Rory "
Const searchRange = "A1:Z1500"
Set oSheet = ThisComponent.CurrentController.ActiveSheet
Set oRange = oSheet.getCellRangeByName(searchRange)
For i = 0 To oRange.Rows.getCount() - 1
For j = 0 To oRange.Columns.getCount() - 1
Set oCell = oRange.getCellByPosition( j, i )
idx = InStr(oCell.String,needle)
If ( idx > 0) Then
oCell = oRange.getCellByPosition( j-1, i )
oCell.String = "Rob"
Endif
Next
Next
End Sub