+ Reply to Thread
Results 1 to 2 of 2

File open with part file name

  1. #1
    Registered User
    Join Date
    05-19-2014
    Posts
    35

    File open with part file name

    I need help in opening the file with part file name, please help


    Workbooks.Open FileName:="D:\5. Macro\FY19 - Business Outlook\" & Company & "*new file.xlsb"
    Last edited by vinod2802; 12-14-2018 at 09:48 AM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: File open with part file name

    "Air Code"
    Please Login or Register  to view this content.
    This code finds the first file in the directory, "D:\5. Macro\FY19 - Business Outlook\" with a name starting with Company and ending with .xlsb.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ 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: 12-23-2022, 04:02 AM
  2. Open File in Directory with a Part of Filename as String
    By paesu57 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-11-2014, 06:27 AM
  3. [SOLVED] Open excel file by providing a part of file name through inputbox
    By sbabu16 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-12-2014, 05:30 AM
  4. Open 2nd file(CSV) from cell reference, copy columns to main file & close 2nd file
    By Langchop in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-31-2013, 05:09 AM
  5. [SOLVED] Macro - Master file to import data from another open file with variable file name
    By jdodz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-10-2012, 10:56 PM
  6. [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
  7. How to: Open file, format data, save file, close file and repeat.
    By thexeber in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-11-2010, 12:56 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