Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Error Message Even when I have Error Handling

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 29-06-2012
Member
 
Join Date: Jun 2012
Posts: 3
Error Message Even when I have Error Handling
  

Hello, I am new to vba, but I've worked in several other languages before, yet I am new to error handling and synchronizing a program in general.

In vba (for excel), I have a project that goes through a web form, fills it out, exports the resulting data to a csv in Excel, grabs the data off of the csv, puts it on a separate workbook, repeats the process until all of the forms are done and the workbook has all of the data.

Recently, I added in an error handler that would go through and, if the csv file had not finished downloading, thus giving the "Subscript out of range" error, it would loop through until the csv is finished downloading, is properly called, and dealt with.

The code works perfect when single stepping because the code has more time to wait on various objects and things like that, however when the program is run, it gets ahead of itself and trips over the csv, hence the error handler, and I am unsure how to synchronize the process and the MS Help tends to be simply god awful in assistance on such matters for some one of my youth in the field. (And yes, I have searched both the MS Macros Help and the Internet for a solution to no avail)

While I have the error handler, I still get the "Subscript out of range" error message (this is a new occurrence and did not happen before I tried to give the handler a way to get out of an endless loop by using an integer counter). Is there any recommendation/hints on how to synch/deal with the message/improve the method of the error handling? (possibly a command that would make the error handling loop pause temporarily???)

Reply With Quote
  #2  
Old 30-06-2012
Member
 
Join Date: Jan 2006
Posts: 605
Re: Error Message Even when I have Error Handling

The problem that you are facing may occur if the following conditions are true:
  • The active cell is above the horizontal page break or to the left of the vertical page break that is referred to by the HPageBreaks or VPageBreaks index.
  • The vertical or horizontal page break location is off the screen to the right of the visible window or below the visible window of the workbook.
For workaround, check this link - http://support.microsoft.com/kb/210663
Reply With Quote
  #3  
Old 03-07-2012
Member
 
Join Date: Jun 2012
Posts: 3
Re: Error Message Even when I have Error Handling

Actually, after tinkering around a bit, I got the darned thing to work by taking out the elseif statements I had in the error handler, it will still occur if an error other than one handled by the handler (Currently only error #9 Subscript out of range) But yeah, this problem is solved for now, however this leads me to ask, why did it not like my elseif statements? (which were meant for further debugging) Does vba force me to create and OnError inside of the Error handler in order to sift through others?
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Error Message Even when I have Error Handling"
Thread Thread Starter Forum Replies Last Post
Getting Error message ‘Northbridge Error, node 2<0>K8 ECC error.’ in CentOS 5.5 Pawna Operating Systems 5 04-05-2011 11:50 AM
Leakage and Improper Error Handling in Web applications FaD KiNG Technology & Internet 5 01-02-2011 05:27 PM
What is an Error Handling and Newspapers in PHP? SKREECH Software Development 5 09-03-2010 06:18 AM
MCI command handling window error Bandish Operating Systems 4 29-07-2009 12:51 AM


All times are GMT +5.5. The time now is 09:14 AM.