+ Reply to Thread
Results 1 to 2 of 2

%my document%\PackMaterials\

  1. #1
    Registered User
    Join Date
    07-13-2005
    Posts
    89

    %my document%\PackMaterials\

    Hi everyone and again many thanks for any help.

    In windows we can define environmental variable like %windir% to point to windows folders. Can we do the same for "My Document"?

    I've made a save button macro so that this particular spreadsheet will be saved at C:\Documents and Settings\UserLoginName\My Documents\Stats. However the "UserLoginName" is not the same for all users and I need to distribute this spreadsheet.

    Sub SaveWork()
    Filename = Range("B2").Value
    Workbooks.Open Filename:=%My Document% & "\stats\" & Filename & ".xls"
    end sub

  2. #2
    Registered User
    Join Date
    07-17-2005
    Location
    Bridgwater, Somerset, UK
    Posts
    10
    You could use Application.DefaultFilePath

+ Reply to Thread

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