+ Reply to Thread
Results 1 to 6 of 6

VBA to check if folder is open

  1. #1
    Forum Contributor
    Join Date
    06-18-2010
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    546

    VBA to check if folder is open

    I am using the pushbuttion() event in excel 2000 to follow hyperlink and open a folder. Well of course if the folder is already open the VBA throws an error. Is there a way for me to check if the folder is already open, and if the folder is already open, then DO Nothing?

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,526

    Re: VBA to check if folder is open

    Hi,
    What is the code in your button?

  3. #3
    Forum Contributor
    Join Date
    06-18-2010
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    546

    Re: VBA to check if folder is open

    Please Login or Register  to view this content.
    Last edited by jo15765; 04-20-2012 at 11:00 AM.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: VBA to check if folder is open

    Hello jo15765,

    Try this revision to your code...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  5. #5
    Forum Contributor
    Join Date
    06-18-2010
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    546

    Re: VBA to check if folder is open

    That got it! Thank you!

  6. #6
    Registered User
    Join Date
    07-16-2013
    Location
    UK
    MS-Off Ver
    Excel 2000
    Posts
    1

    Re: VBA to check if folder is open

    Quote Originally Posted by Leith Ross View Post
    Hello jo15765,

    Try this revision to your code...
    Please Login or Register  to view this content.
    Hi I am not sure if you can help but I have used the code above , but instead of having a message box pop up saying the folder is open I would like to bring the open folder to the front

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1