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 change caption font color at runtime

The following code creates checkboxes on a form at runtime
I'm trying to change the font color of the caption

For iColumn = constStartColumn To i_NUMCOLUMNS
Set ctlMyControl = frmEditPartVolume!
frWhereUsed.Controls.Add("Forms.CheckBox.1")
Next iColumn

iLeft = iHorizSpacing
iTop = iVertSpacing

iTotalControls = frmEditPartVolume!frWhereUsed.Controls.Count
iColumn = constStartColumn
For Each ctlMyControl In frmEditPartVolume!frWhereUsed.Controls
ctlMyControl.Caption = Worksheets("Part List").Cells(10,
iColumn)
ctlMyControl.Left = iLeft
ctlMyControl.Height = iCheckBoxHeight
ctlMyControl.Font.Size = 8.25
crashes at this point
ctlMyControl.Font.ColorIndex = 3

ctlMyControl.AutoSize = True


---
Message posted from http://www.ExcelForum.com/

 
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
Checkbox to change background color, font color and remove/ add bo Sara Excel Discussion (Misc queries) 2 May 1st 23 11:43 AM
Cannot change font color or cell color Bezell Excel Discussion (Misc queries) 2 January 30th 09 06:12 PM
Change in font and color dberger16 New Users to Excel 4 January 22nd 09 04:26 PM
how can I conditionally change font color, or background color? MOHA Excel Worksheet Functions 3 August 21st 06 06:57 PM
How to change the default Border, Font Color, and Cell Color Elijah Excel Discussion (Misc queries) 3 November 2nd 05 11:52 PM


All times are GMT +1. The time now is 01:04 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"