Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default (Error 1004) Object Defined Error ...simple code

I have the following simple simple code:

Dim s as String

s = WeekdayName(1) ' Causes Error 1004


Why would the above call to "WeekdayName(1)" suddenly
cause an Object Defined Error?? My program has been working
nicely for awhile, but now all of a sudden it halts at the above line???
What the heck is going on???

Robert Crandal

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default (Error 1004) Object Defined Error ...simple code

Hi Robert,

It works fine for me. However, checking out Help, the first day of week
parameter is supposed to default to Sunday (or 1) as the first day of the
week but it appears to default to zero.

Tested in xl2002 and xl2007

If it has been working previously I don't suppose that s has been used
elsewhere as a constant or something. Try changing the variable name to
strDOW or something.


--
Regards,

OssieMac


"Robert Crandal" wrote:

I have the following simple simple code:

Dim s as String

s = WeekdayName(1) ' Causes Error 1004


Why would the above call to "WeekdayName(1)" suddenly
cause an Object Defined Error?? My program has been working
nicely for awhile, but now all of a sudden it halts at the above line???
What the heck is going on???

Robert Crandal

.

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
Run Time Error 1004 Application-defined or object-defined error forsimple loop? Need help with what's wrong? Naji[_2_] Excel Programming 2 October 16th 09 05:45 PM
Export a chart in a GIF file. Run-time error '1004': Application-defined or object-defined error; [email protected] Excel Programming 4 September 16th 07 11:09 PM
Application-Defined or Object-Defined Error on simple code Fid[_2_] Excel Programming 1 July 21st 05 08:30 PM
Application-Defined or Object-Defined Error on simple code [email protected] Excel Programming 6 February 22nd 05 09:03 PM
Macro Run-time Error 1004 Application Defined or Object Defined Error Anddmx Excel Programming 6 June 9th 04 03:40 PM


All times are GMT +1. The time now is 09:42 PM.

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

About Us

"It's about Microsoft Excel"