Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
re the code below, the code will only execute if called
from a form when the spreadsheet is loading. If I call the code from a button on the sheet itself I obtain an error - "unable to set the colorindex property of the font class" I would love an explanation of the problems with the code Steve Sub Reveal_Cells(Rng As Range, Default_Value As Variant) Rng.Interior.ColorIndex = 19 Rng.Font.ColorIndex = 5 Rng.Value = Default_Value End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
works fine for me. Are you passing a range & value? Is
the cell/sheet protected? Patrick Molloy Microsoft Excel MVP -----Original Message----- re the code below, the code will only execute if called from a form when the spreadsheet is loading. If I call the code from a button on the sheet itself I obtain an error - "unable to set the colorindex property of the font class" I would love an explanation of the problems with the code Steve Sub Reveal_Cells(Rng As Range, Default_Value As Variant) Rng.Interior.ColorIndex = 19 Rng.Font.ColorIndex = 5 Rng.Value = Default_Value End Sub . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Yes I pass in a range + value. The worksheet is not protected. What is odd is that the line Rng.Value = Default_Value Will work fine if the others are commented out, all the others to do with colors etc cause exceptions if run at any time other than startup. I should mention I am using excel 97 thanks Steve -----Original Message----- works fine for me. Are you passing a range & value? Is the cell/sheet protected? Patrick Molloy Microsoft Excel MVP -----Original Message----- re the code below, the code will only execute if called from a form when the spreadsheet is loading. If I call the code from a button on the sheet itself I obtain an error - "unable to set the colorindex property of the font class" I would love an explanation of the problems with the code Steve Sub Reveal_Cells(Rng As Range, Default_Value As Variant) Rng.Interior.ColorIndex = 19 Rng.Font.ColorIndex = 5 Rng.Value = Default_Value End Sub . . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
is the procedure on a userform's code?
make sure the form is loaded by the button Patrick -----Original Message----- Yes I pass in a range + value. The worksheet is not protected. What is odd is that the line Rng.Value = Default_Value Will work fine if the others are commented out, all the others to do with colors etc cause exceptions if run at any time other than startup. I should mention I am using excel 97 thanks Steve -----Original Message----- works fine for me. Are you passing a range & value? Is the cell/sheet protected? Patrick Molloy Microsoft Excel MVP -----Original Message----- re the code below, the code will only execute if called from a form when the spreadsheet is loading. If I call the code from a button on the sheet itself I obtain an error - "unable to set the colorindex property of the font class" I would love an explanation of the problems with the code Steve Sub Reveal_Cells(Rng As Range, Default_Value As Variant) Rng.Interior.ColorIndex = 19 Rng.Font.ColorIndex = 5 Rng.Value = Default_Value End Sub . . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
unable to set the values property of the series class | Excel Discussion (Misc queries) | |||
Unable to set the XValues property of the Series class | Charts and Charting in Excel | |||
Unable to set Bold property of the Font Class | Excel Programming | |||
Unable to set the colorIndex Property of the Interior Class Error | Excel Programming | |||
Unable to set the Locked Property of the Range Class | Excel Programming |