Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default EXCEL VB Macro Run Time Error 1004 - Setting ColorIndex

A macro developed and running ok under Offixe/XP prodcues
Run time error 1004 "Unable to set Colour Index for
Interior Class" when the spreadsheet macro is run on a PC
running XP but EXCEL prior to Office XP. I have beleive
the problem VB statement a

Set Rng = ActiveSheet.Range("B6:U55")
Rng.Interior.ColorIndex = xlNone

A work around would be appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default EXCEL VB Macro Run Time Error 1004 - Setting ColorIndex

When you say that other pc is running XP, is that winXP?

I'm guessing yes. If the version of excel prior to xl2002 is xl97, then it
could be a bug in xl97.

If you run a macro from a control on a worksheet from the controltoolbox
toolbar, you can either toggle the .takefocusonclick to false for that control
or add:

activecell.activate

to the top of your code.

If that prior version wasn't xl97, then ignore this message.



Erwin wrote:

A macro developed and running ok under Offixe/XP prodcues
Run time error 1004 "Unable to set Colour Index for
Interior Class" when the spreadsheet macro is run on a PC
running XP but EXCEL prior to Office XP. I have beleive
the problem VB statement a

Set Rng = ActiveSheet.Range("B6:U55")
Rng.Interior.ColorIndex = xlNone

A work around would be appreciated.


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default EXCEL VB Macro Run Time Error 1004 - Setting ColorIndex

Is the sheet protected. No reason it shouldn't work on an unprotected
sheet.

--
Regards,
Tom Ogilvy

"Erwin" wrote in message
...
A macro developed and running ok under Offixe/XP prodcues
Run time error 1004 "Unable to set Colour Index for
Interior Class" when the spreadsheet macro is run on a PC
running XP but EXCEL prior to Office XP. I have beleive
the problem VB statement a

Set Rng = ActiveSheet.Range("B6:U55")
Rng.Interior.ColorIndex = xlNone

A work around would be appreciated.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default EXCEL VB Macro Run Time Error 1004 - Setting ColorIndex

Code works ok on my excel 9

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default EXCEL VB Macro Run Time Error 1004 - Setting ColorIndex

If the colour index is changed somewhere in the code , i.e it value is
cahnges, bit maybe that the value is too large, or small, excel, 97,
has a range for charts of 0-60, i think!
good luck
ross


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
error 1004 when setting pivottable.pagefields Amedee Van Gasse Excel Discussion (Misc queries) 0 September 24th 08 01:39 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
MACRO Run Time Error 1004 The Toasterman Excel Discussion (Misc queries) 1 June 30th 06 04:22 PM
Macro Issue - Run time error 1004 Matt7102 Excel Discussion (Misc queries) 1 December 22nd 05 12:35 AM


All times are GMT +1. The time now is 01:39 AM.

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

About Us

"It's about Microsoft Excel"