+ Reply to Thread
Results 1 to 3 of 3

How to get the current directory of the workbook by VBA script?

  1. #1
    Registered User
    Join Date
    07-08-2010
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    8

    Smile How to get the current directory of the workbook by VBA script?

    I have opened two workbooks. One sheet have to be moved to another. For that I have used the below code
    Please Login or Register  to view this content.
    "Production-16.xls" is the target filename, which will be changed every time.
    I have get the "directory" & "file name" separately, then concate the strings, and open the file (by script).

    Please Login or Register  to view this content.
    I want to simplify it more...
    Is it possible to do the following (by VBA script):
    A browse window to be opened to select the file (or) current directory of the opened file to be get by script.

    PLEASE HELP!!!
    Last edited by AlexandarRamaiyan; 07-20-2010 at 07:09 AM. Reason: Corrected code tags

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: How to get the current directory of the workbook by VBA script?

    Hi,
    Please note the syntax for code tags is not like HTML - it's [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] (I've corrected it for you this time)

    You should look at
    Please Login or Register  to view this content.
    in the Help.
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    07-08-2010
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: How to get the current directory of the workbook by VBA script?

    Yes. Thank you very much!!!

+ 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