+ Reply to Thread
Results 1 to 4 of 4

Change title in an open dialog box and keep selected filename as string

  1. #1
    Registered User
    Join Date
    09-11-2013
    Location
    Montreal, Qc, Canada
    MS-Off Ver
    Excel 2013
    Posts
    41

    Change title in an open dialog box and keep selected filename as string

    I am using

    Please Login or Register  to view this content.
    but I would like to change the title of the dialog window. I tried refering to getopenfilename method (Title argument), but couldn't have something that compiles!



    Also, when the user selects the file to open, is there a way to store the name of the file as a string for futur use? (Lets use
    Please Login or Register  to view this content.
    )

    Thanks,

    Annie

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Change title in an open dialog box and keep selected filename as string

    that dialog has these arguments

    xlDialogOpen file_text, update_links, read_only, format, prot_pwd, write_res_pwd, ignore_rorec, file_origin, custom_delimit, add_logical, editable, file_access, notify_logical, converter

    if you want to change the title you will need to use the getopenfilename

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    09-11-2013
    Location
    Montreal, Qc, Canada
    MS-Off Ver
    Excel 2013
    Posts
    41

    Re: Change title in an open dialog box and keep selected filename as string

    This works fine to change the title, but I still have the rest of the problem:

    Since the macro has to navigate between worksheets to transfer data, I cannot seem to be able to use this function as it doesn't compile:
    Please Login or Register  to view this content.
    I guess it is so because vntFilename is a Variant and not a string. Any options?

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Change title in an open dialog box and keep selected filename as string

    unlike the open dialog, getopenfilename only returns a file(s) path and filename. You then have to open the workbook.

    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)

Similar Threads

  1. [SOLVED] Open file with a specific string in the filename
    By vikas.mehta80 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-18-2012, 05:19 PM
  2. HOW: Open Browse Window, Select File, Copy Filename Selected.
    By monak83 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2012, 03:43 AM
  3. Add specific title to open dialog box
    By rinser in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-15-2009, 06:16 AM
  4. Replies: 1
    Last Post: 08-22-2006, 08:30 PM
  5. help with manipulating string and open dialog box
    By funkymonkUK in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-21-2006, 07:20 AM

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