Consulting

Results 1 to 4 of 4

Thread: Code retrives https:// in Windows Explorer instead of windows explorer drive

  1. #1

    Code retrives https:// in Windows Explorer instead of windows explorer drive

    Hi,

    I have the problem with ThisWorkbook.name in the following part of my code


     str_FileName = Left(ThisWorkbook.name, InStrRev(ThisWorkbook.name, ".") - 1)
    Unfortunately a https:// path is retrieved for ThisWorkbook.name instead of the drive's path, which I connected correctly with Sharepoint.
    The Sharepoint folder is connected with Windows explorer, which I gave the name Z:\

    Had someone the same problem and know how to solve it??

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    Use Replace() to replace the string with the drive you want.

  3. #3
    Hi Kenneth the problem is that the drive is always different.
     Call foFS.CopyFile(ThisWorkbook.FullName, str_DestPathName, True)
    How to copy the workbok without the path???

  4. #4
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

Posting Permissions

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