+ Reply to Thread
Results 1 to 2 of 2

Close an open workbook with different names

  1. #1
    Registered User
    Join Date
    01-11-2012
    Location
    Kent, England
    MS-Off Ver
    Excel 2010
    Posts
    96

    Close an open workbook with different names

    I Guys

    I have a file that I use throughout the day to check efficiency and I download the report then import it into a file that makes viewing the data easier. Since we changed to edge the downloaded files stay in the folder so when i run the import macro I have to delete the old file and run the report again. The file is efficiency report but when more than one file is downloaded it adds (1) etc. after the file name which stops the macro form working. I have attached the file so if anyone has any ideas that would be great.

    thanks for looking

    Cheers

    Ross
    Attached Files Attached Files
    Cheers

    Ross

  2. #2
    Registered User
    Join Date
    05-12-2021
    Location
    Europe
    MS-Off Ver
    365
    Posts
    45

    Re: Close an open workbook with different names

    This uses relative name of the file:
    Please Login or Register  to view this content.
    I also attached your file with the modified code
    Attached Files Attached Files

+ 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. Copy from first workbook, close open new workbook paste close
    By johncarr1952 in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 08-04-2021, 08:50 AM
  2. [SOLVED] Open workbook if not already open then close same file if was not already open
    By abhinavbinkar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-30-2018, 02:50 AM
  3. [SOLVED] Issue with Open, copy, close Macro - when trying to close workbook Clipboard error
    By seanpcorbett1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-13-2016, 05:14 PM
  4. Refresh all queries on workbook open, when finished print to pdf then close workbook
    By Bree Harvey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-06-2014, 04:53 AM
  5. [SOLVED] Open Multiple Workbooks, Record names, Copy paste to Active Workbook, Close the Workbooks
    By vba_madness in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-24-2013, 06:09 AM
  6. Code to open a workbook, do what i want, close it, and open the next
    By stuartsjg in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-30-2010, 05:43 PM
  7. Save an open workbook, then open template workbook and close the saved workbook
    By ondvirg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-27-2009, 10:20 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