Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default 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   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 232
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro code to put series name next to individual line in line grap Otani Charts and Charting in Excel 3 February 23rd 10 07:24 PM
Continue line of VBA code on the next line peacelittleone Excel Programming 9 June 24th 05 07:46 PM
Help with 1 code line JMay Excel Programming 6 June 7th 04 03:16 AM
Help with 1 code line Norman Jones Excel Programming 0 June 6th 04 02:08 PM
Same code, different line Neil[_14_] Excel Programming 3 January 7th 04 08:38 AM


All times are GMT +1. The time now is 01:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"