LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.office.developer.vba
external usenet poster
 
Posts: 7
Default Excel VBA: Browse For Folder - Cancel Button

Dear All

I'm afraid I have another question on this highly active topic. I am
using some code that I found here on Google Groups, a bit of John
Walkenbach's work I think. Any way, the code results in a Browse for
folder dialogue box with three buttons... Make New Folder, OK and
Cancel. My problem lies with the Cancel button, when pressed the macro
hangs, most likely for the following reason...

I use the string (folder path) to open three files in that directory.
When the macro is debugged and I pause the mouse pointer over the
string variable, it shows a row of squares too long to fit in the tool
tips box (presumably, the font isn't available to show what it really
is). Hence, it is trying to open a non-existent file path.

What I would like to do is add a line saying "If (string) = (whatever
'Cancel' returns) Then GoTo Cancelled:" before the string is
used.

I have tried the following remedies (none of which has worked)
- Putting the string in a cell so I can read it (it comes out blank).
- Putting If (string) = "" ...
- Putting If (string) = Null ...
- Etc etc...

For full details of the code, just ask (I'd like to resist cluttering
up the screen for as long as possible, and I barely understand the code
I have copied anyway!)

Many thanks

Rob

 
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
Browse button on form for folder path Greshter Excel Discussion (Misc queries) 2 January 12th 06 10:20 PM
Browse for folder - Jim Rech's MD Excel Programming 4 February 8th 05 10:29 PM
Jim Rech's Browse for Folder Keb[_2_] Excel Programming 0 July 14th 04 02:53 PM
Browse for folder MD Excel Programming 1 July 13th 04 01:23 PM
Browse For Folder start directory Todd Huttenstine Excel Programming 2 May 12th 04 02:24 PM


All times are GMT +1. The time now is 06:13 AM.

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"