Results 1 to 5 of 5

Refer Folder/Filename in VBA code through Named cell reference

Threaded View

  1. #1
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    584

    Thumbs up Refer Folder/Filename in VBA code through Named cell reference

    Dear Friends,

    I have the following codes in which I am to refer a file and folder to do some further processes.

    myfilename = "C:\Documents and settings\acs\My Documents\Entry\myfile1.xls"
    folderPath = "C:\Documents and settings\acs\My Documents\Entry\"

    I want to enter these two paths in a sheet in my excel report file (For example, I am running the report from Report1.xls, in which there is a sheet name "Filepaths". In this,

    in B5, I would like to enter the Filepath (B5 named as "FILEPATH")
    in B6, I would like to enter the Folderpath (B6 named as "FOLDERPATH")

    So that, if I am copying the folder to another area, I no need to change the code every time in the VBA editor. I can do changes in these cells and it will be taken as the path to run the code further.

    Sincerely waiting for your kind reply,

    Thanks in advance,

    acsishere.
    Last edited by acsishere; 10-31-2008 at 11:07 AM.

Thread Information

Users Browsing this Thread

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

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