LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Back color of dynamically-created buttons

Hi,
I have created a number of buttons using code which works very
successfully. The code I've used is as follows:

'In progress
With ActiveSheet.Buttons.Add(Left:=l, Top:=t + 20, Width:=60,
Height:=16)
.OnAction = "Pro_Hilite"
.Characters.Text = "In Progress"
.Name = "cmdProg"
End With

(In progress is the name of one of my buttons.)

If I add in the statement .BackColor = RGB(0, 255, 0),or .BackColor =
vbRed to this code, then I get an error message saying the object
doesn't support this property or method.

My question is: can I change the back color of a button created this
way and if so how could I do it?

Many thanks in anticiaption.

Simon
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Scaling a chart that has been dynamically created in vb Mark Charts and Charting in Excel 3 May 27th 05 08:16 PM
dynamically changing chart y axis using spin buttons and worksheet_calculate event jimnwilson Excel Programming 2 July 10th 04 04:24 AM
Assign macros to dynamically created form elements Joepy Excel Programming 4 March 3rd 04 09:03 PM
Dynamically Adding Code to Buttons on an existing UserForm Peter Street Excel Programming 2 September 29th 03 09:54 AM


All times are GMT +1. The time now is 07:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"