+ Reply to Thread
Results 1 to 3 of 3

[SOLVED] Unable to run excel macro after changing file name

  1. #1
    merf
    Guest

    [SOLVED] Unable to run excel macro after changing file name

    After changing the filename in an excel macro, receiving Error number 5 -
    Invalid procedure call or argument when users with excel 2000 run the macro.
    Users with excel 2003 are not having this issue

  2. #2
    Chip Pearson
    Guest

    Re: Unable to run excel macro after changing file name

    Post the line of code that is causing the error.


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "merf" <[email protected]> wrote in message
    news:[email protected]...
    > After changing the filename in an excel macro, receiving Error
    > number 5 -
    > Invalid procedure call or argument when users with excel 2000
    > run the macro.
    > Users with excel 2003 are not having this issue




  3. #3
    merf
    Guest

    Re: Unable to run excel macro after changing file name

    Here is the macro code:

    Dim Message, Title, Default, OperID, Response
    Message = "Enter the PeopleSoft User ID of the person who ran the
    report:"
    Title = "Format Daily Hire Report: PeopleSoft User ID"
    OperID = InputBox(Message, Title)
    fName =
    "\\OMACSAN01\PEOPLESOFT\Report_Output\user\Reports\DAILY-REPORT-" & OperID &
    ".CSV"

    With Application.FileSearch
    .NewSearch
    .LookIn = "\\OMACSAN01\PEOPLESOFT\Report_Output\user\Reports"
    .Filename = fName
    Workbooks.Open Filename:=fName

    After hitting 'Workbooks.Open Filename:=fName' is when we receive the error.
    Thanks for your help.

    "Chip Pearson" wrote:

    > Post the line of code that is causing the error.
    >
    >
    > --
    > Cordially,
    > Chip Pearson
    > Microsoft MVP - Excel
    > Pearson Software Consulting, LLC
    > www.cpearson.com
    >
    >
    > "merf" <[email protected]> wrote in message
    > news:[email protected]...
    > > After changing the filename in an excel macro, receiving Error
    > > number 5 -
    > > Invalid procedure call or argument when users with excel 2000
    > > run the macro.
    > > Users with excel 2003 are not having this issue

    >
    >
    >


+ 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