Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a code that refresh data. Sometime's no data is retrived and
code stops. What is best way to handel this error. I have following but am sure there must be a better way to do it as have a lot of error handeling to add. 'Update Firmorders On Error GoTo 1 Sheets("Firm orders on RF").Visible = True Sheets("Firm orders on RF").Select Range("A3").Select Selection.QueryTable.Refresh BackgroundQuery:=False Sheets("Firm orders on RF").Visible = False 1 Range("A3").Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlDown)).Select Selection.ClearContents Sheets("Firm orders on RF").Visible = False GoTo 2 2 UserForm1.Label4.Caption = "Step 3 in progress" UserForm1.Repaint 'Update Firm orders not on RF On Error GoTo 3 Sheets("Firm orders not on RF").Visible = True Sheets("Firm orders not on RF").Select Range("A3").Select Selection.QueryTable.Refresh BackgroundQuery:=False Sheets("Firm orders not on RF").Visible = False 3 Range("A3").Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlDown)).Select Selection.ClearContents Sheets("Firm orders not on RF").Visible = False GoTo 4 4 UserForm1.Label4.Caption = "Step 4 in progress" UserForm1.Repaint Thanks for any help Simon |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code for Error handling using F5 from debug mode | Excel Programming | |||
Managed code error handling from VBA | Excel Programming | |||
Incorporating error handling to Bob's code | Excel Programming | |||
Error handling in this code | Excel Discussion (Misc queries) | |||
VB handling on mdi print error code 1004 | Excel Programming |