+ Reply to Thread
Results 1 to 7 of 7

open file

  1. #1
    Registered User
    Join Date
    12-15-2014
    Location
    belgium
    MS-Off Ver
    2003
    Posts
    75

    open file

    I'm trying to create a macro to open a file that can only be opened if it is correctly equal to "machinelijst_draaien"
    With this macro he does not open anything, not even with the exact name and so always go to the msgbox 'Incorrect filename'
    Please Login or Register  to view this content.

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: open file

    Hi
    Getopenfilename returns the full file path and name, not just the name.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: open file

    Debug the code and determine what machinelijst_draaien equals before the msgbox.

  4. #4
    Registered User
    Join Date
    12-15-2014
    Location
    belgium
    MS-Off Ver
    2003
    Posts
    75

    Re: open file

    I fear that I do not know how to do this or what and where I need to change

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,912

    Re: open file

    This might help.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  6. #6
    Registered User
    Join Date
    12-15-2014
    Location
    belgium
    MS-Off Ver
    2003
    Posts
    75

    Re: open file

    Problem solved by now, you may consider the question as solved, but thank you for the comments
    With kind regards, Fernand

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,912

    Re: open file

    If it's solved for you.

    Please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Replies: 5
    Last Post: 02-01-2018, 10:56 AM
  2. Replies: 2
    Last Post: 12-21-2015, 04:20 PM
  3. [SOLVED] VBA Open File/Run Macro/Close &Save/Open Next File
    By JPSIMMON in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-21-2015, 12:16 PM
  4. 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
  5. [SOLVED] open variably named file, copy/paste data into consolidation file, open next file in list
    By sllawrence1968 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 09:49 PM
  6. VBA for excel 2003. Open file dialog box, open 2007 file xlsx, continue with code
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-25-2011, 12:12 AM
  7. Open a file do a macro ( made) and open next succesive file
    By SVTman74 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-21-2006, 05:20 PM

Tags for this Thread

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