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

cannot set UserDefinedAttributes for calc sheet

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


Joined: 08 Mar 2005
Posts: 1

PostPosted: Tue Mar 08, 2005 9:36 am    Post subject: cannot set UserDefinedAttributes for calc sheet Reply with quote

Hi,

Being a newbie to OObasic and the Uno API I found myself strugling setting a "UserDefinedAttributes" property of a Cell. Here's my piece of code. Can someone please tell me what I' m doing wrong.

Dim userprop As Variant
oDoc = ThisComponent
oCell = oDoc.Sheets.getByName("name").getCellByPosition(0, 0)
color = oCell.getPropertyValue("CellBackColor")
userprop = oCell.getPropertyValue("UserDefinedAttributes")

MsgBox userprop.Dbg_methods, 64, "methods"

' this resonse with a bunch of methods containing at least the insertByName
' SbxVOID insertByName( SbxSTRING,SbxVARIANT);

Dim aname as Variant
aname = "yo"
userprop.insertByName("monkey",aname)

' now I recieve a "com.sun.star.lang.illegalArgumentException"


Thanks in advance.

bme
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Wed Mar 09, 2005 9:47 am    Post subject: Reply with quote

See this example.....
http://www.oooforum.org/forum/viewtopic.phtml?p=69530#69530
_________________
Want to make OOo Drawings like the colored flower design to the left?
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