Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I can get this to work:
(using "x" as an integer variable) activesheet.oleobjects("Commandbutton" & x).visible = true but this doesn't: activesheet.oleobjects("Commandbutton" & x).forecolor = vbRed Any ideas on how to change the CommandButton color in a For/Next loop with a variable? Thanks, John |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveSheet.OLEObjects("Commandbutton" & x).Object.ForeColor = vbRed
-- HTH Bob Phillips "John Wilson" wrote in message ... I can get this to work: (using "x" as an integer variable) activesheet.oleobjects("Commandbutton" & x).visible = true but this doesn't: activesheet.oleobjects("Commandbutton" & x).forecolor = vbRed Any ideas on how to change the CommandButton color in a For/Next loop with a variable? Thanks, John |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "Bob Phillips" wrote in message ... ActiveSheet.OLEObjects("Commandbutton" & x).Object.ForeColor = vbRed -- HTH Bob Phillips "John Wilson" wrote in message ... I can get this to work: (using "x" as an integer variable) activesheet.oleobjects("Commandbutton" & x).visible = true but this doesn't: activesheet.oleobjects("Commandbutton" & x).forecolor = vbRed Any ideas on how to change the CommandButton color in a For/Next loop with a variable? Thanks, John |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob,
Sometimes it's the simplest things that trip you up. Thanks for the help. John "Bob Phillips" wrote in message ... ActiveSheet.OLEObjects("Commandbutton" & x).Object.ForeColor = vbRed -- HTH Bob Phillips "John Wilson" wrote in message ... I can get this to work: (using "x" as an integer variable) activesheet.oleobjects("Commandbutton" & x).visible = true but this doesn't: activesheet.oleobjects("Commandbutton" & x).forecolor = vbRed Any ideas on how to change the CommandButton color in a For/Next loop with a variable? Thanks, John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change the face color of an Excel command button | Excel Discussion (Misc queries) | |||
Change color of command button | Excel Discussion (Misc queries) | |||
command button color | Excel Programming | |||
loop command in Macro | Excel Programming | |||
loop command in Macro | Excel Programming |