OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Visual Basic - Make invisible a range of cells of a sheet

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
Montse
Guest





PostPosted: Wed Jun 04, 2003 1:17 am    Post subject: Visual Basic - Make invisible a range of cells of a sheet Reply with quote

Hi,
I don't find the way to change the visibility of a range of cell of a sheet or a group of columns.

AnyBody Know the method to do this in Visual Basic? or the property?

Thanks!!
Back to top
pepe
General User
General User


Joined: 26 May 2003
Posts: 7
Location: Spain

PostPosted: Thu Jun 05, 2003 3:41 am    Post subject: Reply with quote

Hi!
to hide columns and rows of the actual sheet...:

Code:

Sub Main

   Dim oDocument as Object
   Dim oSheet as Object
   Dim oRange as Object

   oDocument = StarDesktop.ActiveFrame.Controller.Model
   oSheet = oDocument.CurrentController.getActiveSheet()
   oRange = oSheet.getCellRangeByName("A1:BZ1")
   oRange.getColumns.IsVisible = False   ' set True to show again ...
 

   oRange = oSheet.getCellRangeByName("B1:B1")
   oRange.getRows.IsVisible = False        ' set True to show again ...

End Sub
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group