Consulting

Results 1 to 5 of 5

Thread: Solved: Workbooks.Open issue in Excel 2010 (Network Drive)

  1. #1
    VBAX Regular
    Joined
    Jan 2008
    Posts
    34
    Location

    Exclamation Solved: Workbooks.Open issue in Excel 2010 (Network Drive)

    Hello All,

    Not sure it anyone has come accross this problem before?

    I am trying to use the following code:

    strFOLDER2 is the string folder name
    strMONTH is the string format number of the month (e.g. 07)

    [vba]

    ' Open existing file
    Workbooks.Open Filename:="\\SERVER\Folder1\" & strFOLDER2 & _
    "\FILENAME - " & strMONTH
    [/vba]

    The variables contain the correct values and the whole filepath is correct.

    The code was written in 2003, but we are currently 'upgrading' to 2010. Works fine in 2003, but in 2010 comes back with a 'Microsoft Excel cannot open the file...' error.

    The file is a 2003 file, and this can be manually opened from 2010 without issue, but the macro will not open the file.

    I'm hoping i'm missing something really really simple, but have tried all I can think of to sort this. (including using the mapped drive letter rather than the server name).

    Can anyone please help?

    Cheers,

    Adrian

  2. #2
    VBAX Expert CatDaddy's Avatar
    Joined
    Jun 2011
    Posts
    581
    Location
    [VBA]Application.Workbooks.Open Filename:="O:\\Folder\Folder2\MyWorkbook.xlsx"[/VBA]

    this worked to open my network drive files
    ------------------------------------------------
    Happy Coding my friends

  3. #3
    VBAX Regular
    Joined
    Jan 2008
    Posts
    34
    Location
    That works Great, thanks

  4. #4
    VBAX Expert CatDaddy's Avatar
    Joined
    Jun 2011
    Posts
    581
    Location

    Smile

    Quote Originally Posted by AdrianK
    That works Great, thanks
    it took me forever to figure out why that didnt work...be careful if it is going to a different computer the same share drive might be mapped differently!!!
    ------------------------------------------------
    Happy Coding my friends

  5. #5
    VBAX Regular
    Joined
    Jan 2008
    Posts
    34
    Location
    Yes, I couldnt understand why they would change it and what was missing either.

    luckily all network drives are mapped the same way for everyone.

    Thanks again.

    Adrian

Posting Permissions

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