+ Reply to Thread
Results 1 to 6 of 6

VBA copy sheet to new workbook path/file access error

  1. #1
    Registered User
    Join Date
    05-27-2020
    Location
    Guangzhou-China
    MS-Off Ver
    Office 2016
    Posts
    28

    VBA copy sheet to new workbook path/file access error

    Hi all,

    I checked many solutions to fix my issue but i am not able to correct it, I have a file placed on a server and I would like to copy the sheet "PO" to a new workbook via VBA.

    My VBA code is really simple :

    Sub CopyPO()

    ActiveWorkbook.Sheets("PO").Copy

    End Sub

    The macro work well when I run it from the file placed in on my desktop but when i run it from the server i got Path/file access error VB???.tmp (the ??? always change if i run the code severals times)

    I tried many ways without viable solution.

    I will be glad to get some help.

    Thx
    Geoffrey

  2. #2
    Registered User
    Join Date
    05-27-2020
    Location
    Guangzhou-China
    MS-Off Ver
    Office 2016
    Posts
    28

    Re: VBA copy sheet to new workbook path/file access error

    Hi,

    To give more details, i tried to manually copy the sheet and i got the same issue, i also tried to create a new empty file and try to manualy copy the sheet and it s works, so i think it s an issue with the file itself but i cannot find out what it is.

  3. #3
    Forum Contributor
    Join Date
    08-27-2015
    Location
    Singapore
    MS-Off Ver
    Office 2010, Office 365
    Posts
    158

    Re: VBA copy sheet to new workbook path/file access error

    Hi Hunker,

    Are you able to run the macro in the server? I presume you're using a shared drive/server and having issue running the excel.

    If so, you can try below method.
    Control Panel > Internet Options > Change security settings.
    In the trusted site, include the IP address of the drive and see if it's working.

  4. #4
    Registered User
    Join Date
    05-27-2020
    Location
    Guangzhou-China
    MS-Off Ver
    Office 2016
    Posts
    28

    Re: VBA copy sheet to new workbook path/file access error

    I checked and it s not that issue, I tried to delete all my macro and at that time i was able to manually copy the sheet but once have maccro in the file it s only working on my desktop and not on my shared server.

    So strange...

  5. #5
    Forum Contributor
    Join Date
    08-27-2015
    Location
    Singapore
    MS-Off Ver
    Office 2010, Office 365
    Posts
    158

    Re: VBA copy sheet to new workbook path/file access error

    As there is no sample file provided, the vba code you've provided works fine to me. I've tried it on my shared server and it's also working.

    I'm not sure what do the others think but based on the errors, its looks like some issue with the path and file name. There might be something you used in other part of macro.

  6. #6
    Registered User
    Join Date
    05-27-2020
    Location
    Guangzhou-China
    MS-Off Ver
    Office 2016
    Posts
    28

    Re: VBA copy sheet to new workbook path/file access error

    Hello,

    Thanks for your feedback, there are severals VBA code on my file, i cannot upload it here because it s too heavy, i uploaded it on wetransfer, let me know if it s running on your server.

    File : https://we.tl/t-OB7m9XBtay

    The maccro to copy sheet is linked to a bouton on sheet "PO" , colunm F , bouton "PO Confirmation".

    Let me know if it s run on your server.

    Thx mate,
    Geoffrey

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Recover Damaged Excel File Corrupted By Path/File Access Error
    By SuperShaggy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2016, 07:20 AM
  2. Path/File access error & Can't load or unload this object (Error 361)
    By WilliamWu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-28-2014, 12:05 PM
  3. Path/File access error
    By Scott in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-20-2014, 05:31 AM
  4. Run time error 75 (Path/File Access Error) - Excel 2007 on XP SP3
    By Portuga in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-30-2014, 10:39 AM
  5. Path/File access error ... ?
    By phantuhuong in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-23-2009, 09:04 AM
  6. Path/File Access Error
    By Geetha in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-16-2006, 04:05 AM
  7. [SOLVED] Path/file access error
    By Scott in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-22-2006, 09:05 AM

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