By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,699 Members | 1,213 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,699 IT Pros & Developers. It's quick & easy.

Formatting Borders in Excel Spreadsheet

P: 1
I'm trying to format borders in my exported query but I can't seem to do it.

I'll keep this simple, this is what I'm trying to do.
Set xlsheet = xlworkbook.Sheets(1)
With xlsheet
With .Range("A2:J" & intRowCount)
.Borders(xlEdgeTop).LineStyle = xlContinuous
.ColorIndex = xlAutomatic
End With
End With

It's not working, any idea how to get this going?

Thanks.
Jun 13 '07 #1
Share this Question
Share on Google+
1 Reply

ADezii
Expert 5K+
P: 8,750
I'm trying to format borders in my exported query but I can't seem to do it.

I'll keep this simple, this is what I'm trying to do.
Set xlsheet = xlworkbook.Sheets(1)
With xlsheet
With .Range("A2:J" & intRowCount)
.Borders(xlEdgeTop).LineStyle = xlContinuous
.ColorIndex = xlAutomatic
End With
End With

It's not working, any idea how to get this going?

Thanks.
Give this the old try:

Expand|Select|Wrap|Line Numbers
  1. xlSheet.Range("A2:J" & intRowCount).Select
  2.  
  3. With Selection.Borders(xlEdgeTop)
  4.   .LineStyle = xlContinuous
  5.   .Weight = xlMedium
  6.   .ColorIndex = xlAutomatic
  7. End With
Jun 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.