Jump to content

VB 2005 - Change an object's color using a variable


Recommended Posts

I am trying to change an object's color by passing a variable to the object

 

I know i left alot out but this is just to show you what i have in mind:

sub mnuColorsBlue_click
     strBackColor = "Color.Blue"

     changeColor(strBackColor)
end sub

sub changeColor(strBackColor)
     me.mnuMoney.BackColor = strBackColor
end sub

 

is this even possible? vb keeps telling me the color has to be less than infinity

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.