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

insertCells - Second parameter

 
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: Mon Apr 28, 2003 8:27 am    Post subject: insertCells - Second parameter Reply with quote

Hi,
I'm working with VBA and I have a problem with the second parameter of the method InsertCells.
My example is:
Set oBook = oWorksheet.insertCells(oRange, 1)

And it returnes me: 'Type mismatch'.
I think the problem is with the second parameter =>1. What must I put here? or the problem is other thing?

Thanks,
Very Happy
Back to top
paolo
General User
General User


Joined: 02 Mar 2003
Posts: 31
Location: Italy

PostPosted: Mon Apr 28, 2003 10:25 am    Post subject: Reply with quote

Montse,

the second parameter should be a value from the enum
Code:

com.sun.star.sheet.CellInsertMode


This is the complete list of possible values:
Code:

com.sun.star.sheet.CellInsertMode.NONE
com.sun.star.sheet.CellInsertMode.DOWN
com.sun.star.sheet.CellInsertMode.RIGHT
com.sun.star.sheet.CellInsertMode.ROWS
com.sun.star.sheet.CellInsertMode.COLUMNS

refer to the Developers Guide for further infos.

Unfortunately I don't know how pass enum values from VBA ;-(
But I might that a simple
Code:

Set oBook = oWorksheet.insertCells(oRange, com.sun.star.sheet.CellInsertMode.RIGHT)

could works.


Ciao
Back to top
View user's profile Send private message
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