Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Mar 2002
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Network File (97 sr2)

    This may be more of a general VB question but it is for my Excel project so I figured I would start here. I am good with spreadsheets, not networks... <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

    I have a spreadsheet that is going to be shared by different users on a Win95 network. The macros in the workbook refer to other files stored on a shared directory. The problem is that not every user's network drives are mapped to the same drive letter so using references in the module code like "H:SharedFilesProjectDirectorySharedBook .xls" doesn't work. I tried "NetNodeSharedFiles<etc...>" with no luck either.

    Is there any way to "teach" the workbook what drive letter a current user has for a given share? The one thing I can be sure of is that once they connect to the workbook they are connected to the right network drive, whatever letter it appears as on their machine.

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Network File (97 sr2)

    ThisWorkbook.FullName give you the path and name of the workbook.
    You can extract the drive letter from that.
    Francois

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Network File (97 sr2)

    Left(Thisworkbook.Path,1) yields the drive letter.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •