LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Runtime error 1004

I get an error "Application-defined or object-defined error" when validating
input in cell N4 of my worksheet. For other cells in the worksheet (columns
A-K) it works fine. I've checked all settings, there's no difference with
other cells. What's wrong ?

I use the following code:

With Worksheets(1).Range("N4").Validation
.Add Type:=xlValidateWholeNumber, _
AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:="1", _
Formula2:="8"
.ErrorMessage = "Enter digit between 1 and 8"
.ShowInput = False
.ShowError = True
End With

If I put in on error resume next, I don't get an error, it works fine.
But: excel shows : value must be between 1 and 8 iso. my error message
...... !

Is this an Excel 2003 bug ? How to resolve this ?
 
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
runtime error '1004' application or object defined error Janis Excel Programming 4 November 18th 09 03:01 PM
runtime error '1004' application or object defined error. Please help deej Excel Programming 0 August 1st 07 09:26 AM
Uh oh...Runtime error 1004!!!! zenahs[_7_] Excel Programming 0 March 20th 06 05:16 PM
Runtime error 1004 Daniel Excel Programming 2 July 19th 05 04:37 AM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM


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