Run-time error 1004 on border grid

J

Janice

Hi,

I had an application that download data to Excel spreadsheet. Using the same
application, I was given run-time error '1004': "Unable to set the LineStyle
property of the Border class" on some PCs and on others PCs are running fine.
When debug, the error was at line area
".Borders(xlInsideHorizontal).LineStyle". I suppose it was the PC setting
that differ but could not find out where. All PCs are installed with Excel
2003 SP3.

Please advise. Thanks.
 
D

Dave Peterson

The inside horizontal border will only be available if you have at least two
contiguous (vertical) cells selected. Are you sure that this is the case?

Is the worksheet protected?

And a silly guess if those aren't the problem...

Try changing to a different printer.
 
J

Janice

The worksheet is not protected. Changing to a different printer does not work
either.
Any other possibilities? Thank you.
 
D

Dave Peterson

I'm out of guesses.

Can you step through the code manually and see what it's doing. Maybe add some
msgboxes to display range addresses before the failing line of code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top