Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CBW CBW is offline
external usenet poster
 
Posts: 3
Default Run-Time Error

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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run-Time Error


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


--
mrice


------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=532731

  #3   Report Post  
Posted to microsoft.public.excel.programming
CBW CBW is offline
external usenet poster
 
Posts: 3
Default Run-Time Error

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

"mrice" wrote:


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


--
mrice


------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=532731


  #4   Report Post  
Posted to microsoft.public.excel.programming
CBW CBW is offline
external usenet poster
 
Posts: 3
Default Run-Time Error

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.

"CBW" wrote:

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!

Reply
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
Visual Basic Error Run Time Error, Type Mismatch Meg Partridge Excel Discussion (Misc queries) 12 September 10th 08 06:10 PM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error rdavis7408 Excel Programming 1 August 25th 04 03:54 AM
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) Tim[_36_] Excel Programming 4 April 23rd 04 02:53 AM
Run-time error '11' & Run-time error '1004' Piers Clinton-Tarestad Excel Programming 0 January 9th 04 08:35 PM


All times are GMT +1. The time now is 03:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"