Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that imports external data specifying a file name, location.
With ActiveSheet.QueryTables.Add(Connection..... ......End With If that file is not there I would want a message box. I have tried 'On Error' but it behaved the same with or without the file present. Where do I need to do the display a message if the file is missing and not display a message if the file is found? (Same question asked yesterday after I tried the 'On Error') |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try:
If <file path\name then 'Will be TRUE if file exists, FALSE if not import file else do msg box end if "GEB" wrote: I have a macro that imports external data specifying a file name, location. With ActiveSheet.QueryTables.Add(Connection..... .....End With If that file is not there I would want a message box. I have tried 'On Error' but it behaved the same with or without the file present. Where do I need to do the display a message if the file is missing and not display a message if the file is found? (Same question asked yesterday after I tried the 'On Error') |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
#VALUE ERROR Question | Excel Discussion (Misc queries) | |||
Standard Error Question | Excel Worksheet Functions | |||
Error msg question | Excel Discussion (Misc queries) | |||
#Ref error question | Excel Worksheet Functions | |||
Drillthrough MDX ERROR(Error.Number:-21467259) ?(urgent question) | Excel Programming |