+ Reply to Thread
Results 1 to 3 of 3

Using VBA how do you close a user defind workbook after you have extracted data

  1. #1
    Registered User
    Join Date
    11-14-2012
    Location
    Lebanon, Oregon
    MS-Off Ver
    Excel 2010
    Posts
    47

    Using VBA how do you close a user defind workbook after you have extracted data

    I have created a button call that lets the user select the desired xls file. The command then opens the file and takes data from column B and does a paste special (transpose) into the orignal workbook (Drawing Redlines.xls). The problem I am having is the user defind file will never have the same name. How do I setup the code to close the macro opend workbook once the data has been extracted?
    If I define the file it works fine but the file name will never be the same hence the problem.

    These are some sample files
    DRAWING REDLINES.xlsmDWGLST.xls

    And here is the whole code as of now:
    Please Login or Register  to view this content.
    This is the part I am having problems with:
    Please Login or Register  to view this content.

    Any help would be appreciated. I have been looking on this forum and others but I have not been able to find anything so I am posting my qquestion.
    Thanks in advance
    Last edited by klonbeck; 11-14-2012 at 06:02 PM.

  2. #2
    Registered User
    Join Date
    07-27-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007/2010
    Posts
    86

    Re: Using VBA how do you close a user defind workbook after you have extracted data

    Something like this
    Please Login or Register  to view this content.
    Boon

  3. #3
    Registered User
    Join Date
    11-14-2012
    Location
    Lebanon, Oregon
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Using VBA how do you close a user defind workbook after you have extracted data

    That fixed my problem perfectly!!
    Thank you very much for the Quick help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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