View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Brenda Brenda is offline
external usenet poster
 
Posts: 137
Default add line during code

I am using VB.NET. When I run it, it gives me this error:

Additional information: Public member 'XlBordersIndex' on type
'ApplicationClass' not found.

Any ideas why?

--
Brenda


"ben" wrote:

first off are you coding directly in excel or is another application handling
this sub?

.Cells(intRow + rowCount + 2, intColumn +
10).Borders(xlEdgeTop).LineStyle = xlContinuous

if this is in a with end with loop it should work.
but it will only work for one cell are you trying to add it to a range of
cells?


--
When you lose your mind, you free your life.


"Brenda" wrote:

I am trying to have a line put in after I do this coding:

.Cells(intRow + rowCount + 2, intColumn + 10).Value = "=(I" & total_RowCOGS
& "/I" & total_IncRow & ")*.01"
.Cells(intRow + rowCount + 2, intColumn + 10).NumberFormat = "0.00%"
.Cells(intRow + rowCount + 2, intColumn + 10).Font.Bold = True

I've tried this but NO luck:

.Cells(intRow + rowCount + 2, intColumn +
10).Borders.get_Item(Excel.XlBordersIndex.xlEdgeTo p).LineStyle =
Excel.XlLineStyle.xlContinuous

Any ideas? I really would like to add this feature in. Thanks!


--
Brenda