View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.programming
NickHK[_3_] NickHK[_3_] is offline
external usenet poster
 
Posts: 415
Default Random corruption in Excel files

I'm using a Chinese system now and the everything seems a bit more stable.
If that is due to the system or the changes, I cannot tell at the moment.

Still same problem with "Rebuild All kanji" ; only two rows 192 pixels high.
Ah, but now I get 5 rows (A1:BC5), mostly filled shades of green, except one
cell in red and last row no fill.

If you put a break point on the line
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
on the "test' userform, I then get errors.
After that it continues to error, whatever.
Without the break point, I seems to work, somewhat.

Without a lot more to see what you are actually doing, I cant't much more
than this.
There's certainly problems with maintaining a consistent state of the WB.

I'll see what I can determine over the weekend, but you certianly need a
more stable environment before release to the public.

NickHK

"mps" ...

Nick,
Even after addressing those issues, the result is the same. See my
comments
below and http://www.japaneselearningtools.com/crash3.zip

"NickHK" wrote:

1- Your WB seems to be jumping around in size a lot 8MB4MB*MB for small
changes.
Would be a good idea to get one of the Code Cleaners, e.g.
http://www.appspro.com/Downloads/CodeCleaner.exe

I am using it now (though it is not having any affect on the code size).
2- Also, you need more checking of the current situation before you try
to
change some value/property.

Public Function CurrentJlptLevel() As Integer
If lastTestedWordIndex = 0 Then
'....
Test!KanjiTestRules.RemoveItem 1
This line error because Test!KanjiTestRules.ListCount=0

And Combox index is 0 based, not 1 based.

The code above is correct. In the Workbook_Open method I am putting 3
items
in the listbox. The code above changes the 2nd item.

3- People report trouble with lines like
..UsedRange.Rows.count - 1
in some Excel versions/situations, maintaining a correct value of
.UsedRange
without a save. Check that this range is the range you think you should
be
working on.

I don't use it for spreadsheets that are changing shapes.

4- I tend to avoid using variable/Function names like Row, Text,
Character
that are used by Excel/VBA to avoid confusion.

I changed my code to not use those.

Any more ideas?

Mike