Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When I use "s = application.GetOpenFilename()" I have two options: a) s =
False (boolean) because I canceled the function; b) s = the selected file (no boolean). When I use Y = ubound(s), Excel displays a 13 error, if s = False. When I use a "if s = False then.." statement, Excel displays a 13 error if s = the selected file. I had tried the "on error resume next" instruction but it does not function.. How can I deal with this situation? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Try something like Code: -------------------- Sub ddd() Dim GetFileName GetFileName = Application.GetOpenFilename() If GetFileName < False Then MsgBox "got a file name " & GetFileName Else MsgBox "Cancelled out" End If End Sub -------------------- rylo -- rylo ------------------------------------------------------------------------ rylo's Profile: http://www.thecodecage.com/forumz/member.php?userid=28 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=28929 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "rylo" wrote: Hi Try something like Code: -------------------- Sub ddd() Dim GetFileName GetFileName = Application.GetOpenFilename() If GetFileName < False Then MsgBox "got a file name " & GetFileName Else MsgBox "Cancelled out" End If End Sub -------------------- rylo -- rylo ------------------------------------------------------------------------ rylo's Profile: http://www.thecodecage.com/forumz/member.php?userid=28 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=28929 Thank you Rylo, the key was the "Dim GetFileName" Antonio |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Throwing Circular Errors When No Errors Exist | Excel Worksheet Functions | |||
GetOpenFilename - Trapping Errors | Excel Programming | |||
Unresolved Errors in IF Statements - Errors do not show in results | Excel Worksheet Functions | |||
GetOpenFilename | Excel Programming | |||
GetOpenFilename | Excel Programming |