+ Reply to Thread
Results 1 to 5 of 5

Run time error 52: Bad file name or number

  1. #1
    Registered User
    Join Date
    07-15-2009
    Location
    Rockford, IL
    MS-Off Ver
    Excel 2003
    Posts
    38

    Run time error 52: Bad file name or number

    Hi,
    I am having problem with a excel file generation using vba. This is happening to just one user. Could somebody say the possible reason of the error. I have not found any good solution for resolution. If it is permission what
    do I need to do to allow more permission to the folder where the files are being opened and written into.
    Thanks
    Last edited by gamaz; 11-19-2009 at 05:44 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Run time error 52: Bad file name or number

    Hi,

    Is the user given freedom to enter a path and filename or does the VBA macro mandate the file name?

    Rgds
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    07-15-2009
    Location
    Rockford, IL
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: Run time error 52: Bad file name or number

    Thanks Richard. Actually the user is not given the freedom to enter a path or a filename. Yes the Vba macro mandate the file name.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Run time error 52: Bad file name or number

    Hi,

    See if the following offers any help.

    http://support.microsoft.com/kb/271513

    There also appears to be various suggestions if you google: Excel File Save Permission

    Rgds

  5. #5
    Registered User
    Join Date
    07-15-2009
    Location
    Rockford, IL
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: Run time error 52: Bad file name or number

    Thanks for your help again Richard. Does the dir function use on a folder assumes a particular permission on the folder. It seems the directory function
    is creating the error.
    Thanks.

+ 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