PC Review


Reply
Thread Tools Rate Thread

defined error

 
 
karaisland@gmail.com
Guest
Posts: n/a
 
      31st May 2008
Of a virus problem I had to reinstall my windows xp and office xp.
And I faced this highlighted error
" Application defined or object defined error "
No need to add this was a smoothly working vba code before.

Worksheets("compare1").Range("a2:iv10000").ClearContents

Any idea ? Thank you.

 
Reply With Quote
 
 
 
 
Per Jessen
Guest
Posts: n/a
 
      31st May 2008
On 31 Maj, 21:45, karaisl...@gmail.com wrote:
> Of a virus problem I had to reinstall my windows xp and office xp.
> And I faced this highlighted error
> " Application defined or object defined error "
> No need to add this was a smoothly working vba code before.
>
> Worksheets("compare1").Range("a2:iv10000").ClearContents
>
> Any idea ? Thank you.


Hi

Nothing wrong with the statement.

Does the worksheet "compare1" exists in the active workbook?

regards,
Per
 
Reply With Quote
 
karaisland@gmail.com
Guest
Posts: n/a
 
      31st May 2008
Yes Per, it exists.

Thank you
 
Reply With Quote
 
karaisland@gmail.com
Guest
Posts: n/a
 
      1st Jun 2008
>If you get undefined variables for vb constants,
> replace them with their numeric values.


Thank you Bob.
That is exactly what happened. How disturbing it is.
But why I never had such error before i don't understand.
 
Reply With Quote
 
karaisland@gmail.com
Guest
Posts: n/a
 
      2nd Jun 2008
Worksheets("compare1").Range("a2:iv10000").ClearContents
this is not good

Worksheets("compare1").Range("a2:IV10000").ClearContents
this is good

Took my 2 days to find out a solution to
" Application defined or object defined error " . God !
 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      2nd Jun 2008
Your problem may have gone away, but this was not the solution.

VBA doesn't care if your range address was in upper/lower/mixed case.

(E-Mail Removed) wrote:
>
> Worksheets("compare1").Range("a2:iv10000").ClearContents
> this is not good
>
> Worksheets("compare1").Range("a2:IV10000").ClearContents
> this is good
>
> Took my 2 days to find out a solution to
> " Application defined or object defined error " . God !


--

Dave Peterson
 
Reply With Quote
 
karaisland@gmail.com
Guest
Posts: n/a
 
      2nd Jun 2008
On Jun 2, 8:51*pm, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> Your problem may have gone away, but this was not the solution.
>
> VBA doesn't care if your range address was in upper/lower/mixed case.


Hi Dave

But I didn't have any problem at all in the first place.
It was like finding your donkey after loosing.
I'd be so pleased if I know what the problem was.

Thanks
 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      2nd Jun 2008
I've had some problems with .clearcontents when the area contained merged cells.

Any chance?

(E-Mail Removed) wrote:
>
> On Jun 2, 8:51 pm, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> > Your problem may have gone away, but this was not the solution.
> >
> > VBA doesn't care if your range address was in upper/lower/mixed case.

>
> Hi Dave
>
> But I didn't have any problem at all in the first place.
> It was like finding your donkey after loosing.
> I'd be so pleased if I know what the problem was.
>
> Thanks


--

Dave Peterson
 
Reply With Quote
 
karaisland@gmail.com
Guest
Posts: n/a
 
      3rd Jun 2008
> I've had some problems with .clearcontents when the area contained merged cells.
> Any chance?


Hi Dave

Upon further examinations on other files I decided that
I have a problem with letter " i ". Funny but true.
Again on below code same error msg appeared.

With Worksheets("costtabletour3").Range("g2:i1000").Validation

I have twice reinstalled xp' but no avail.
Only few days ago I had no such problem but now I am changing all "i"s
to " I ".

Thanks
 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      3rd Jun 2008
And if you build a small test workbook and have just enough stuff to be able to
test, does it work ok (with the lowercase i)???

(E-Mail Removed) wrote:
>
> > I've had some problems with .clearcontents when the area contained merged cells.
> > Any chance?

>
> Hi Dave
>
> Upon further examinations on other files I decided that
> I have a problem with letter " i ". Funny but true.
> Again on below code same error msg appeared.
>
> With Worksheets("costtabletour3").Range("g2:i1000").Validation
>
> I have twice reinstalled xp' but no avail.
> Only few days ago I had no such problem but now I am changing all "i"s
> to " I ".
>
> Thanks


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find: runtime error 1004 Application-defined or object-defined error inspired Microsoft Excel Discussion 3 30th Nov 2010 12:34 PM
Run Time Error 1004 Application-defined or object-defined error forsimple loop? Need help with what's wrong? Naji Microsoft Excel Programming 2 16th Oct 2009 05:45 PM
Export a chart in a GIF file. Run-time error '1004': Application-defined or object-defined error; cschiffers@gmail.com Microsoft Excel Programming 5 17th Sep 2007 12:48 PM
error: ActiveCell.Offset(0, -1).Select = Application-defined or object-defined error -[::::Shamran::::]- Microsoft Excel Programming 7 7th Jun 2005 02:14 PM
Macro Run-time Error 1004 Application Defined or Object Defined Error Anddmx Microsoft Excel Programming 6 9th Jun 2004 03:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:01 PM.