View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default A very simple question....

Here is one I just recorded to color a SHAPE. maybe it will help
Sub Macro12()
ActiveSheet.Shapes("Rectangle 2").Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 11
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.SchemeColor = 48
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
End Sub

"S.S.Sander" wrote in message
...
Since i have just discovered the VBA-part of my office
2000 i have a - presumably - very simple Q.

I wish to create a procedure that can change the colour of
all the controls on a particular worksheet in a workbook.

i.e. I have 6 optionbuttons and two checkboxes on a sheet
I wish to assign a certain color to.
I know how to extract the colour from a cell, assign it to
a long-variable... But then....
My problem is to cycle through all the controls on a given
sheet, assign the variable to the individual control(Since
it seem as the OLEObjects dont have the .Backcolor
property)

Sorry for this obviously simple Q, but i have to start
somewhere.... (And for me it isnīt simple- on the contrary)