Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
add line during code
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
add line during code
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro code to put series name next to individual line in line grap | Charts and Charting in Excel | |||
Continue line of VBA code on the next line | Excel Programming | |||
Help with 1 code line | Excel Programming | |||
Help with 1 code line | Excel Programming | |||
Same code, different line | Excel Programming |