Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

range error

Status
Not open for further replies.

lowlyintern

Programmer
Sep 6, 2005
1
US
I'm using excel 97 and access 97 on my computer. I wrote some code that runs through a form in access at the click of a button. The code works fine on my computer, but gets errors when I try using it on other computers which have excel 2000 and access 97. The code opens an excel application and manipulates data that is imported from the internet. The only difference I can see as maybe causing a problem is the fact that 2000 uses object library 10.0 and the computer that this code works on uses excel object library 8.0. Specifically, I get errors on these lines.

Range("P2:p" & intfinalrow_room).delete
Range("I2:I" & intfinalrow_room).NumberFormat = "0.00%"

These two lines give run_time errors, the first one being '1004', "Delete method of range class failed". intfinalrow_room is defined earlier in the code as the row # of the last cell with data. Please help a lowly intern that wants to finish this project and take a short break before school starts!!!

Oh yah, and earlier in the code I have a line like this

Range("P2:BB" & intfinalrow_room).Delete

which works with no errors...
 


Hi,

Quallify your reference to the specific Workbook.Worksheet.Range

Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top