Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Is there a bug in Excel 97/Office 97 running macros ?

I created a complicated spreadsheet with about 40 text boxes that have macros attached to them. I wrote one version in 2000 and converted it back to Excel 97. The macros crash Excel 97 when clicked.
I completely re-wrote the program on a computer with Excel 97 and it does the same thing

Is there something wrong with my code or is there a bug in Excel 97 with textboxes and attaching macros
It is random and doesn't behave the same every time.
Both programs work perfectly on a computer with Office/Excel 2000

This is one subroutine that is attached to a textbo
Each click of the textbox results in the value of the cell below it alternating between 1 and 0
and then blanks all adjacent cells if 0 or if 1 it adds CLEAR to column 'D', row 16 and 1 to column 'E', row 1
These subroutines work perfectly in Office 2000 and later but randomly crash in Office 9

Sub Text16C() <--- attached to a textbox on spreadsheet. The textbox is transparent and the cell
X = 16 below it is what is seen. The user clicks on the textbox to enter a 1 in the cel
CX (X
End Su
Sub CX(X
If Range("E" & X) = "" The
Range("E" & X) =
Range("F" & X) = "
Range("G" & X) = "
Range("D" & X) = "CLEAR
Els
Range("D" & X & ":G" & X) = "
End I

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Is there a bug in Excel 97/Office 97 running macros ?

Rich,

Yes, your posted code crashed my XL97 application after about 2 clicks on the
textbox.
The following version did not crash (so far)...
'-----------------------------------------------------------
Sub ClickNumber16()
Dim X As Long
X = 16
CallTheSub X
End Sub

Sub CallTheSub(ByRef X As Long)
If Cells(X, 5).Value = vbNullString Then
Cells(X, 4).Value = "CLEAR"
Cells(X, 5).Value = 1
Cells(X, 6).Value = vbNullString
Else
Cells(X, 4).Value = vbNullString
End If
Cells(X, 7).Value = vbNullString
End Sub
'----------------------------------------------------------------

Regards,
Jim Cone
San Francisco, Ca

"Rich J" wrote in message
...
I created a complicated spreadsheet with about 40 text boxes that have macros

attached to them. I wrote one version in 2000 and converted it back to Excel
97. The macros crash Excel 97 when clicked.
I completely re-wrote the program on a computer with Excel 97 and it does the

same thing.

Is there something wrong with my code or is there a bug in Excel 97 with

textboxes and attaching macros ?
It is random and doesn't behave the same every time.
Both programs work perfectly on a computer with Office/Excel 2000.

This is one subroutine that is attached to a textbox
Each click of the textbox results in the value of the cell below it

alternating between 1 and 0
and then blanks all adjacent cells if 0 or if 1 it adds CLEAR to column 'D',

row 16 and 1 to column 'E', row 16
These subroutines work perfectly in Office 2000 and later but randomly crash

in Office 97

Sub Text16C() <--- attached to a textbox on

spreadsheet. The textbox is transparent and the cell
X = 16 below it is what is

seen. The user clicks on the textbox to enter a 1 in the cell
CX (X)
End Sub
Sub CX(X)
If Range("E" & X) = "" Then
Range("E" & X) = 1
Range("F" & X) = ""
Range("G" & X) = ""
Range("D" & X) = "CLEAR"
Else
Range("D" & X & ":G" & X) = ""
End If

End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Is there a bug in Excel 97/Office 97 running macros ?

Jim
Thanks so much. I've not used the Cells(R,C) type referencing before. That seems to have done the trick. I changed all the subroutines in that block of the code and the program works perfectly without any crashes.
I opened up one saved back in 2002 and it crashed the second I clicked one of the textboxes. I ran thru a bunch of testing on the new program and it never crashed.

Thanks again
Rich
Los Angeles
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
running excel 2003 macros Terese Excel Discussion (Misc queries) 0 January 25th 08 10:32 PM
Running Macros in Excel 2003 mickey Excel Worksheet Functions 3 May 7th 07 10:42 AM
Running macros when Excel starts up Solly Excel Discussion (Misc queries) 1 July 13th 05 11:38 AM
Excel xp running with Office 2000 kyoung Excel Discussion (Misc queries) 5 April 10th 05 12:11 PM
Problem running macros in Office/Excel 97 Rich J Excel Programming 1 January 29th 04 06:16 PM


All times are GMT +1. The time now is 02:30 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"