Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
merf
 
Posts: n/a
Default 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   Report Post  
Chip Pearson
 
Posts: n/a
Default

Post the line of code that is causing the error.


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


"merf" wrote in message
...
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   Report Post  
merf
 
Posts: n/a
Default

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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to save a file as ynissel Excel Discussion (Misc queries) 4 May 26th 05 02:48 PM
changing page break in an excel file ibs81 New Users to Excel 1 April 14th 05 07:03 PM
Button fails to call macro when open an Excel via Intranet tigertax Excel Discussion (Misc queries) 1 April 12th 05 10:21 AM
Opening an Excel file Sheldon Zaklow Excel Discussion (Misc queries) 0 March 3rd 05 10:29 PM
Excel 2000 file when opened in Excel 2003 generates errors? Doug Excel Discussion (Misc queries) 13 December 25th 04 10:20 PM


All times are GMT +1. The time now is 07:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"