LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Overflow error in Progress Bar

I got an "Overflow" error in one of my Progress Bar. When debugging the
code, I found out that I am able to reproduce the problem any time. The bar
width is 300 points and I want to show progress 200 times. The sample code
below reproduce the problem all the time. Can someone tell me what is wrong?

By the way, I am using Ms-Office Excel 2003 SP3.


Sub CheckOverflow()
Dim i As Integer
Dim r As Integer
r = 200
On Error Resume Next
For i = 1 To r
Err.Clear
Cells(i, 1) = 300 * (i - 1) / r
If Err Then Cells(i, 1) = Error(Err)
'Call MyMacro()
Next i
End Sub

 
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
Overflow error, need help mkerstei[_15_] Excel Programming 3 July 14th 06 03:10 AM
Overflow Error DG Excel Discussion (Misc queries) 3 April 15th 05 05:45 PM
Overflow Error DG Excel Programming 3 April 15th 05 05:45 PM
Overflow error Jim Berglund Excel Programming 3 January 30th 05 05:57 PM
Help! Overflow Error 6 Gauthier Excel Programming 6 September 24th 04 12:57 PM


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