Unable to change NumberFormat Property
I have a sheet where I would like to adjust the format of the cell where a
user enters data, based on the entry type they have selected. The sheet is
protected, and the following If statement is contained within a macro for the
Change event of a combo box, and also nested within a pair of statements to
first unprotect, then protect the sheet.
If Stop_Loss_Limit_Type.Text = "$ Amount" Then
Sheets("Entry").Protect AllowFormattingCells:=True
Range("Min_entry").NumberFormat = "Currency"
Sheets("Entry").Protect AllowFormattingCells:=False
End If
When this is run, I get a run-time error 1004, with error message "Unable to
set the NumberFormat property of the Range class". Any advice on why this
might be welcomed - as far as I am aware setting allowformattingcells
property to true should allow me to change the number format.
Thanks
Geoff
--
There are 10 types of people in the world - those who understand binary and
those who don't.
|