|
-
December 14th, 2009, 03:51 PM
#1
setting backcolor using a string
Hmmm... I have a string , say
strUncleFred = "vbRed"
or
strUncleFred = "vbGreen"
then I want
textGoat.BackColor = strUncleFred
But I get a type mismatch error. I see that .backcolor expects a long value, so I tried using
Clng(strUncleFred) ....but that got me nowhere
I really want to use only the simple Vb colors specified when the use types in a string.
I can see that vbRed is a constant and "vbRed" is something else--a string, but can you convert one to the other so easy way?
Last edited by vbcandies; December 14th, 2009 at 04:03 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|