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

Wrong color is appearing

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


Joined: 14 Sep 2010
Posts: 10
Location: Kansas, USA

PostPosted: Mon Dec 20, 2010 2:51 pm    Post subject: Wrong color is appearing Reply with quote

I've got the below lines of code, one displays the correct color and one doesn't. Any ideas?

This sub displays gray as desired:
Code:
Sub ChangeCellGrey(CellToColor)
   CellToColor.CellBackColor = RGB(187, 187, 187)  ' grey gray

This sub displays a golden yellow color, but it's supposed to be cyan (or a turquoise blue):
Code:
Sub ChangeCellColorBlue(CellToColor2)
   CellToColor2.CellBackColor = RGB(0, 197, 223)  ' turquoise blue

In my first Symphony spreadsheet and writing Basic macros, the RGB function performed simply and as expected. Now I'm in my second Symphony spreadsheet and for some reason, what's supposed to be cyan is golden yellow.

I use the following website to see instantly what color the various numbers for RGB produce. http://www.masstraffic.com/java/rgb-slider.html Thanks!
_________________
Jeff
Back to top
View user's profile Send private message Send e-mail
hanya
Super User
Super User


Joined: 04 May 2005
Posts: 543
Location: Japan

PostPosted: Mon Dec 20, 2010 6:49 pm    Post subject: Reply with quote

If you use VBASupport 1, the order of the colors are reversed.
Back to top
View user's profile Send private message
jeffkan1
General User
General User


Joined: 14 Sep 2010
Posts: 10
Location: Kansas, USA

PostPosted: Mon Dec 20, 2010 8:28 pm    Post subject: Reply with quote

Wow, you are right, VBASupport 1 is in my code. But when I commented them all out of all the modules, the color still is the same incorrect color. Other ideas? Thanks very much!
_________________
Jeff
Back to top
View user's profile Send private message Send e-mail
hanya
Super User
Super User


Joined: 04 May 2005
Posts: 543
Location: Japan

PostPosted: Mon Dec 20, 2010 11:18 pm    Post subject: Reply with quote

Code:
CompatibilityMode(False)
 '... = RGB(255, 0, 0)
CompatibilityMode(True)
Back to top
View user's profile Send private message
jeffkan1
General User
General User


Joined: 14 Sep 2010
Posts: 10
Location: Kansas, USA

PostPosted: Tue Dec 21, 2010 7:53 am    Post subject: [SOLVED] Cell color wrong Reply with quote

THAT did it.
What are the details behind a "CompatibilityMode" command needing to be shut off, so that the RGB command works properly? Is it because the original spreadsheet was Excel? When I open the spreadsheet, I always see a message stating:
Quote:
Any modification that you make to the VBA macro code runs correctly but cannot be saved by IBM Lotus Symphony. Only the original VBA macro code can be saved in the Microsoft Office file.

I see this even though I'm always editing the Basic code.

Thanks for the fix!! Very Happy
_________________
Jeff
Back to top
View user's profile Send private message Send e-mail
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