Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default GetOpenFilename() errors

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default GetOpenFilename() errors


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default GetOpenFilename() errors



"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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Throwing Circular Errors When No Errors Exist MDW Excel Worksheet Functions 1 August 10th 06 02:15 PM
GetOpenFilename - Trapping Errors Tim Childs Excel Programming 5 April 9th 06 03:58 PM
Unresolved Errors in IF Statements - Errors do not show in results Markthepain Excel Worksheet Functions 2 December 3rd 04 08:49 AM
GetOpenFilename Todd Htutenstine Excel Programming 2 May 13th 04 03:14 PM
GetOpenFilename Wolfgang Excel Programming 1 February 6th 04 07:37 PM


All times are GMT +1. The time now is 01:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"