Run-time error 1004 on border grid

  • Thread starter Thread starter Janice
  • Start date Start date
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.
 
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.
 
The worksheet is not protected. Changing to a different printer does not work
either.
Any other possibilities? Thank you.
 
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.
 
Back
Top