Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Format Date in Save AS function

I am receiving a strange error message when trying to run the below script:

ActiveWorkbook.SaveAS "c:\Daily Reports for DP\NPP_" & Format(Date,
"mmddyy")

The error i get highlights "Format" and a msg box says:

Compile Error:

Wrong number of arguments or incalid property assignment

Any ideas as to what is wrong?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Format Date in Save AS function

You have probably used Format as the name of a routine you wrote. Find that
routine and change the name.

--
Regards,
Tom Ogilvy

"Greg H." wrote:

I am receiving a strange error message when trying to run the below script:

ActiveWorkbook.SaveAS "c:\Daily Reports for DP\NPP_" & Format(Date,
"mmddyy")

The error i get highlights "Format" and a msg box says:

Compile Error:

Wrong number of arguments or incalid property assignment

Any ideas as to what is wrong?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Format Date in Save AS function

I am not worthy. Thank you so much for that light bulb moment.

"Tom Ogilvy" wrote:

You have probably used Format as the name of a routine you wrote. Find that
routine and change the name.

--
Regards,
Tom Ogilvy

"Greg H." wrote:

I am receiving a strange error message when trying to run the below script:

ActiveWorkbook.SaveAS "c:\Daily Reports for DP\NPP_" & Format(Date,
"mmddyy")

The error i get highlights "Format" and a msg box says:

Compile Error:

Wrong number of arguments or incalid property assignment

Any ideas as to what is wrong?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Format Date in Save AS function

On Aug 24, 12:56 pm, Greg H. wrote:
I am receiving a strange error message when trying to run the below script:

ActiveWorkbook.SaveAS "c:\Daily Reports for DP\NPP_" & Format(Date,
"mmddyy")

The error i get highlights "Format" and a msg box says:

Compile Error:

Wrong number of arguments or incalid property assignment

Any ideas as to what is wrong?


I'm not able to reproduce your error, your code (I modified the path a
bit for my machine) worked just fine for me. Tested on both xl2007 and
xl2003.

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
SAVE AS CSV, KEEP DATE FORMAT clau Excel Worksheet Functions 3 April 3rd 23 06:42 PM
Date format won't save...? Erin[_2_] Excel Worksheet Functions 4 December 18th 08 02:48 PM
date format changes when I save to CSV via a macro brawlsadford Excel Programming 1 May 16th 07 02:06 PM
date format changes when I save to CSV via a macro John Taylor Excel Discussion (Misc queries) 4 May 16th 07 01:44 PM
Save Location - Date Format Ravi Sandhu Excel Programming 2 February 12th 04 03:37 PM


All times are GMT +1. The time now is 01:42 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"