pitonyak Administrator


Joined: 09 Mar 2004 Posts: 3618 Location: Columbus, Ohio, USA
|
Posted: Wed Oct 20, 2004 6:19 pm Post subject: |
|
|
Not certain what you really want to do....
| Code: | Sub AddNewDatabaseRange
Dim oRange ' The DatabaseRange object.
Dim oAddr ' The cell address range for the database range.
Dim oSheet ' The first sheet, which will contain the range.
Dim oDoc ' Reference ThisComponent with a shorter name.
oDoc = ThisComponent
If NOT oDoc.DatabaseRanges.hasByName("MyName") Then
oSheet = ThisComponent.getSheets().getByIndex(0)
oAddr = oSheet.getCellRangeByName("A1:F10").getRangeAddress()
oDoc.DatabaseRanges.addNewByName("MyName", oAddr)
End If
oRange = oDoc.DatabaseRanges.getByName("MyName")
oRange.AutoFilter = True
End Sub |
_________________ --
Andrew Pitonyak
http://www.pitonyak.org/oo.php |
|