+ Reply to Thread
Results 1 to 2 of 2

show directory tree if file not found open

Hybrid View

  1. #1
    Registered User
    Join Date
    10-18-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    3

    show directory tree if file not found open

    Hello good people,

    I want to copy data from active workbook to another workbook named "Stockmaster.xlsm". I use wb.activate command to shift to second file and execute active sheet.paste command there.

    If the user has already opened the second file, code runs fine, else it naturally gives error.

    If want create an error handling code whereby if the "Stockmaster.xlsm" file is not open, the directory tree shows up to open the file

    and then the code continues.


    Thanks in anticipation of help from the good souls out there on this wonderful forum.

    warm regards
    Mohan Dhingra

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,936

    Re: show directory tree if file not found open

        Dim D
        D = Application.GetOpenFilename
    Ben Van Johnson

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Do until file name is found in directory
    By beenbee in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-29-2014, 06:54 AM
  2. A file iis found if I open Excel FIRST, but not if I open the file by double-clicking
    By Ed_Collins in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2013, 01:52 AM
  3. Replies: 5
    Last Post: 09-29-2012, 12:40 PM
  4. Need VBA code to search file in directory and sub-directory and show result
    By johnchencanada in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2012, 11:13 PM
  5. [SOLVED] Help with Open File from Directory
    By MarianneBal in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-27-2012, 10:18 AM
  6. Find File in Directory(s) and Open Folder highlighting file
    By cpadude in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-08-2010, 05:39 AM
  7. File Not Found in correct directory, but able to read file name
    By googlebot in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-29-2008, 06:50 PM

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