Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In VBA code, how can I handel a Microsoft Office Excel Dialog that pops up?
All I need to do is recogise that the dialog has appeard and press "OK". -- Thanks Bruce |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try:
Application.DisplayAlerts = False 'run all your code here Application.DisplayAlerts = True RBS "Bruce" wrote in message ... In VBA code, how can I handel a Microsoft Office Excel Dialog that pops up? All I need to do is recogise that the dialog has appeard and press "OK". -- Thanks Bruce |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
unfortunately that does not work. If you create a webquery on an Excel page
then disconnect your connection to the internet and then run the query, you will of course get an error dialog. I am trying to find a way to handle that error dialog in code. Any ideas??? -- Thanks Bruce "RB Smissaert" wrote: Try: Application.DisplayAlerts = False 'run all your code here Application.DisplayAlerts = True RBS "Bruce" wrote in message ... In VBA code, how can I handel a Microsoft Office Excel Dialog that pops up? All I need to do is recogise that the dialog has appeard and press "OK". -- Thanks Bruce |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How about:
On Error Resume Next 'line of code causing the error If Error.Number < 0 Then 'code to handle this error End If Otherwise test for a valid connection first and if not present then do Exit Sub or whatever suitable. RBS "Bruce" wrote in message ... unfortunately that does not work. If you create a webquery on an Excel page then disconnect your connection to the internet and then run the query, you will of course get an error dialog. I am trying to find a way to handle that error dialog in code. Any ideas??? -- Thanks Bruce "RB Smissaert" wrote: Try: Application.DisplayAlerts = False 'run all your code here Application.DisplayAlerts = True RBS "Bruce" wrote in message ... In VBA code, how can I handel a Microsoft Office Excel Dialog that pops up? All I need to do is recogise that the dialog has appeard and press "OK". -- Thanks Bruce |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Think you will need to test if the connection exists before you try to use it.
-- Regards, Tom Ogilvy "Bruce" wrote: unfortunately that does not work. If you create a webquery on an Excel page then disconnect your connection to the internet and then run the query, you will of course get an error dialog. I am trying to find a way to handle that error dialog in code. Any ideas??? -- Thanks Bruce "RB Smissaert" wrote: Try: Application.DisplayAlerts = False 'run all your code here Application.DisplayAlerts = True RBS "Bruce" wrote in message ... In VBA code, how can I handel a Microsoft Office Excel Dialog that pops up? All I need to do is recogise that the dialog has appeard and press "OK". -- Thanks Bruce |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Format a cell such that "#NAME?" reads/appears "N/A"? | Excel Discussion (Misc queries) | |||
Odd error - "This operation requires merged cells..." | New Users to Excel | |||
Scroll Bar missing "Control" tab in "Format Properties" dialog box | Excel Discussion (Misc queries) | |||
"This edit requires a reset!" Error in the VBE | Excel Programming | |||
Using "if" equation that requires auto update | Excel Discussion (Misc queries) |