Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Macro compatibility with Excel 97

Hi,

Can someone help me.
I created excel macros in Excel 2000, however when the macro is opened with
Excel 97 some errors occur. These are some of them:

1.The following command gives RunTime error '1004'
Unable to set the ColorIndex of property of the Interior Class
Sheet13.Cells(StartRow + Row, StartColumn + Column).Interior.ColorIndex = 0

Is there any equivalant code in Excel 97 for the above command?
Why the macro caused error in 97, but not in 2000? Was Interior class not
part of worksheet member?

2. The application terminates automatically when a part of macro is executed
and the following message is displayed on the error dialog box:
"<process has already exit has generated errors and will be closed by
Windows. You will need to restart the program. An error log is being created."

What is the cause of this error? Where can I find the error log?
I tried to put somebreak points to trace the problem, however the error did
not come out during the debug mode. It only came during run time. Why Excel
2000 doesn't have the problem?

Your help is appreciated.

Regards,
Chris

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Macro compatibility with Excel 97

Question 1. There is no colorindex value of 0 (zero) in xl97, xl2000 or xl 2002..
Question 2. Post your code.
The error log could be referring to the "Event" log that windows maintains.
That won't be any help.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Chris L"

wrote in message
Hi,
Can someone help me.
I created excel macros in Excel 2000, however when the macro is opened with
Excel 97 some errors occur. These are some of them:

1.The following command gives RunTime error '1004'
Unable to set the ColorIndex of property of the Interior Class
Sheet13.Cells(StartRow + Row, StartColumn + Column).Interior.ColorIndex = 0

Is there any equivalant code in Excel 97 for the above command?
Why the macro caused error in 97, but not in 2000? Was Interior class not
part of worksheet member?

2. The application terminates automatically when a part of macro is executed
and the following message is displayed on the error dialog box:
"<process has already exit has generated errors and will be closed by
Windows. You will need to restart the program. An error log is being created."

What is the cause of this error? Where can I find the error log?
I tried to put somebreak points to trace the problem, however the error did
not come out during the debug mode. It only came during run time. Why Excel
2000 doesn't have the problem?

Your help is appreciated.

Regards,
Chris

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Macro compatibility with Excel 97

I've tried to replace the value to 1, or replacing the command from
ColorIndex to Color but they stills give the same error.
'Sheet13.Cells(RowMain + Row, ColumnMain + Column).Interior.Color = RGB(126,
255, 126) 'Grey

These are the codes that makes the application terminates:
Sub ClearItem(StartRow As Integer, StartColumn As Integer, Optional Unused
As Boolean = False)
Dim Row, Column
For Row = 1 To 20 Step 1
For Column = 1 To 16 Step 1
Sheet14.Cells(StartRow + Row, StartColumn + Column) = 0
'clear the status in main worksheet
If Unused = False Then

'Any of the following commands terminates Excel 97 in run time
'If breakpoint and Stepover are used, there's no problem
Sheet13.Range("B41") = "Standard"
Sheet13.Range("C41") = ""


End If
Next Column
Next Row

End Sub

Regards,
Chris


"Jim Cone" wrote:

Question 1. There is no colorindex value of 0 (zero) in xl97, xl2000 or xl 2002..
Question 2. Post your code.
The error log could be referring to the "Event" log that windows maintains.
That won't be any help.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Chris L"

wrote in message
Hi,
Can someone help me.
I created excel macros in Excel 2000, however when the macro is opened with
Excel 97 some errors occur. These are some of them:

1.The following command gives RunTime error '1004'
Unable to set the ColorIndex of property of the Interior Class
Sheet13.Cells(StartRow + Row, StartColumn + Column).Interior.ColorIndex = 0

Is there any equivalant code in Excel 97 for the above command?
Why the macro caused error in 97, but not in 2000? Was Interior class not
part of worksheet member?

2. The application terminates automatically when a part of macro is executed
and the following message is displayed on the error dialog box:
"<process has already exit has generated errors and will be closed by
Windows. You will need to restart the program. An error log is being created."

What is the cause of this error? Where can I find the error log?
I tried to put somebreak points to trace the problem, however the error did
not come out during the debug mode. It only came during run time. Why Excel
2000 doesn't have the problem?

Your help is appreciated.

Regards,
Chris


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Macro compatibility with Excel 97


Some questions, ideas, suggestions...

Does "Sheet13" exist?
Try replacing it with the actual worksheet name...
Worksheets("Real Name").Range("B41").Value

"Row" has its own meaning in Excel, don't use it as a variable name.

Could StartRow + Row or RowMan + Row exceed the number of rows?
(same for columns)

Try using the default property for the ranges instead of relying on Excel...
Sheet13.Range("B41").Value = "Standard"

Copy the module code out to Notepad, delete the module and replace
it with a new one.

Jim Cone
San Francisco, USA
http://www.officeletter.com/blink/specialsort.html



"Chris L"
wrote in message
I've tried to replace the value to 1, or replacing the command from
ColorIndex to Color but they stills give the same error.
'Sheet13.Cells(RowMain + Row, ColumnMain + Column).Interior.Color = RGB(126,
255, 126) 'Grey

These are the codes that makes the application terminates:
Sub ClearItem(StartRow As Integer, StartColumn As Integer, Optional Unused
As Boolean = False)
Dim Row, Column
For Row = 1 To 20 Step 1
For Column = 1 To 16 Step 1
Sheet14.Cells(StartRow + Row, StartColumn + Column) = 0
'clear the status in main worksheet
If Unused = False Then

'Any of the following commands terminates Excel 97 in run time
'If breakpoint and Stepover are used, there's no problem
Sheet13.Range("B41") = "Standard"
Sheet13.Range("C41") = ""


End If
Next Column
Next Row

End Sub

Regards,
Chris


"Jim Cone" wrote:

Question 1. There is no colorindex value of 0 (zero) in xl97, xl2000 or xl 2002..
Question 2. Post your code.
The error log could be referring to the "Event" log that windows maintains.
That won't be any help.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Chris L"

wrote in message
Hi,
Can someone help me.
I created excel macros in Excel 2000, however when the macro is opened with
Excel 97 some errors occur. These are some of them:

1.The following command gives RunTime error '1004'
Unable to set the ColorIndex of property of the Interior Class
Sheet13.Cells(StartRow + Row, StartColumn + Column).Interior.ColorIndex = 0

Is there any equivalant code in Excel 97 for the above command?
Why the macro caused error in 97, but not in 2000? Was Interior class not
part of worksheet member?

2. The application terminates automatically when a part of macro is executed
and the following message is displayed on the error dialog box:
"<process has already exit has generated errors and will be closed by
Windows. You will need to restart the program. An error log is being created."

What is the cause of this error? Where can I find the error log?
I tried to put somebreak points to trace the problem, however the error did
not come out during the debug mode. It only came during run time. Why Excel
2000 doesn't have the problem?

Your help is appreciated.

Regards,
Chris


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Macro compatibility with Excel 97

Hi again,

I tried to replace "Range" with "Cells" and the application doesn't
terminates anymore. It's very strange though,... the syntax are valid and it
doesn't seem to be any mistakes.

I still cannot solve the Interior Class problem (Color/ColorIndex), does
anyone know how to change the cell color with macro in Excel 97?

Regards,
Chris

"Jim Cone" wrote:


Some questions, ideas, suggestions...

Does "Sheet13" exist?
Try replacing it with the actual worksheet name...
Worksheets("Real Name").Range("B41").Value

"Row" has its own meaning in Excel, don't use it as a variable name.

Could StartRow + Row or RowMan + Row exceed the number of rows?
(same for columns)

Try using the default property for the ranges instead of relying on Excel...
Sheet13.Range("B41").Value = "Standard"

Copy the module code out to Notepad, delete the module and replace
it with a new one.

Jim Cone
San Francisco, USA
http://www.officeletter.com/blink/specialsort.html



"Chris L"
wrote in message
I've tried to replace the value to 1, or replacing the command from
ColorIndex to Color but they stills give the same error.
'Sheet13.Cells(RowMain + Row, ColumnMain + Column).Interior.Color = RGB(126,
255, 126) 'Grey

These are the codes that makes the application terminates:
Sub ClearItem(StartRow As Integer, StartColumn As Integer, Optional Unused
As Boolean = False)
Dim Row, Column
For Row = 1 To 20 Step 1
For Column = 1 To 16 Step 1
Sheet14.Cells(StartRow + Row, StartColumn + Column) = 0
'clear the status in main worksheet
If Unused = False Then

'Any of the following commands terminates Excel 97 in run time
'If breakpoint and Stepover are used, there's no problem
Sheet13.Range("B41") = "Standard"
Sheet13.Range("C41") = ""


End If
Next Column
Next Row

End Sub

Regards,
Chris


"Jim Cone" wrote:

Question 1. There is no colorindex value of 0 (zero) in xl97, xl2000 or xl 2002..
Question 2. Post your code.
The error log could be referring to the "Event" log that windows maintains.
That won't be any help.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Chris L"

wrote in message
Hi,
Can someone help me.
I created excel macros in Excel 2000, however when the macro is opened with
Excel 97 some errors occur. These are some of them:

1.The following command gives RunTime error '1004'
Unable to set the ColorIndex of property of the Interior Class
Sheet13.Cells(StartRow + Row, StartColumn + Column).Interior.ColorIndex = 0

Is there any equivalant code in Excel 97 for the above command?
Why the macro caused error in 97, but not in 2000? Was Interior class not
part of worksheet member?

2. The application terminates automatically when a part of macro is executed
and the following message is displayed on the error dialog box:
"<process has already exit has generated errors and will be closed by
Windows. You will need to restart the program. An error log is being created."

What is the cause of this error? Where can I find the error log?
I tried to put somebreak points to trace the problem, however the error did
not come out during the debug mode. It only came during run time. Why Excel
2000 doesn't have the problem?

Your help is appreciated.

Regards,
Chris





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Macro compatibility with Excel 97

Is the sheet protected?
Jim Cone


"Chris L"
wrote in message
Hi again,
I tried to replace "Range" with "Cells" and the application doesn't
terminates anymore. It's very strange though,... the syntax are valid and it
doesn't seem to be any mistakes.
I still cannot solve the Interior Class problem (Color/ColorIndex), does
anyone know how to change the cell color with macro in Excel 97?
Regards,
Chris

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Macro compatibility with Excel 97

No, it's not protected.
Anyway, as replacing "Range" to "Cells" prevents it from crashing,
I'm happy with it.
Thank you for your assistance.

Regards,
Chris

"Jim Cone" wrote:

Is the sheet protected?
Jim Cone


"Chris L"
wrote in message
Hi again,
I tried to replace "Range" with "Cells" and the application doesn't
terminates anymore. It's very strange though,... the syntax are valid and it
doesn't seem to be any mistakes.
I still cannot solve the Interior Class problem (Color/ColorIndex), does
anyone know how to change the cell color with macro in Excel 97?
Regards,
Chris


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
Macro compatibility problems between PC and Mac (Excel 97 and Exce marika1981 Excel Programming 1 January 31st 05 02:36 AM
Macro compatibility between excel XP and 97 darryl26 Excel Programming 0 July 30th 04 06:55 PM
Excel 2002/2003 Macro Compatibility issue Steve[_64_] Excel Programming 0 July 23rd 04 03:05 AM
VBA - Macro backward compatibility from excel 2002 to excel 2000 Frank Krogh Excel Programming 3 April 2nd 04 07:08 PM
Excel 97 Macro Compatibility with Excel 2003 J.E. McGimpsey Excel Programming 0 September 25th 03 07:28 PM


All times are GMT +1. The time now is 11:46 PM.

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"