Run-Time Error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We have a little program we run in Excel and it was created in Excel 97. We
all have Windows XP and Office 2000 or 2003.

When I go in to make a change, for example I click a button named "New" to
change a dollar amount. After I change the dollar amount I click another
button named "Submit". It's when I click the submit button that I get the
error message.

Run-Time error '1004':
Unable to set the ColorIndex property of the Font Class

When I click on the "Debug" button it takes me to where the error is but I
don't know how to correct it. Below is a sample of where the "Debug" takes
me in Visual Basic.

Sheets("Rate Sheet").Range("H18:H82").Font.ColorIndex = 11

Can I just change the "=" to another color value and how do I found out what
the color value number is?

Thanks!
 
Are any of the cells in that range protected? This could cause an error
like this.

To get a spreadsheet with all the 56 colours use the following macro.

Sub GenerateColours()
For N = 1 To 56
Cells(N, 1) = N
Cells(N, 2).Interior.ColorIndex = N
Next N
End Sub
 
None of the cells are protected. I think I have a temporary fix. Having
this number change colors is not a big issue and that's all it is, a number
that changes to red when changed. If you accept this number then it changes
back to black. I just didn't know the color values. This really helps,
thanks.
CBW
 
I found out that when this rate is changed it changes rates throughout the
workbook and I won't know what has changed if I don't have the rate in a
different color.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top