View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Michael Vaughan Michael Vaughan is offline
external usenet poster
 
Posts: 71
Default Object-defined error???

Hello Everyone,

I ran into a strange problem. I developed a routine that checks dates and
entries associated to those dates and puts them into an array. Then
according to the dates, it writes to a "startup" page the entries that are
not logged in yet. It is notifying me to check a webpage for automatic
debits that should be posted. The program works great, BUT... I wrote it
separately to get all the bugs worked out, now that they are worked out, I
loaded it into my main program and now it doesn't work right. I keep
getting an "Application-defined or Object-defined Error" when it hits this
line: 'Sheets("Startup").Range("C9:G22").Select

'clear old entries
Sheets("Startup").Range("C9:G22").Select
Selection.ClearContents
Sheets("Startup").Range("E27").Select

Now, if I put a ' in front of those 3 lines of code above, then the program
works ok. Why will it not clear the contents of the Range C9:G22??? I
don't understand???

Beats my two pair??