View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Robert[_37_] Robert[_37_] is offline
external usenet poster
 
Posts: 2
Default VB6 and Excel question

Hello,
I'm using VB6 and Excel 2007. I have a program that creates a report
then
opens it in an Excel spreadsheet. I have done a lot of formatting but
cannot figure out how to get it to do lines (ie: hairline). I tried
the
following code but it doesn't work:

xlWS.Columns("A:K").Borders(xlEdgeLeft).Weight = xlHairline
xlWS.Columns("A:K").Borders(xlEdgeTop).Weight = xlHairline
xlWS.Columns("A:K").Borders(xlEdgeBottom).Weight = xlHairline
xlWS.Columns("A:K").Borders(xlEdgeRight).Weight = xlHairline
xlWS.Columns("A:K").Borders(xlInsideVertical).Weig ht = xlHairline
xlWS.Columns("A:K").Borders(xlInsideHorizontal).We ight = xlHairline

Any ideas?

Thank you,
Robert