ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Add double underline to row (https://www.excelbanter.com/excel-programming/368741-add-double-underline-row.html)

ingineu[_5_]

Add double underline to row
 

I am trying to add a double underline into a specific row (Cell "A" &
row). The row can change so I cannot code the position. Initially I
had the text coded with a double underline, but my user wants some
space between the text and the underline, which led me to try using the
shape object. How would I change the following code:


Code:
--------------------
With Sheets(shtRpt).Shapes.AddLine(0, 100, 132, 100).Line
.Style = msoLineThinThin
.Weight = 3#
End With
--------------------


Thanks.


--
ingineu
------------------------------------------------------------------------
ingineu's Profile: http://www.excelforum.com/member.php...o&userid=14860
View this thread: http://www.excelforum.com/showthread...hreadid=566295


Tom Ogilvy

Add double underline to row
 
Why not make the row height higher and stick with the double underline. Or
put the double underline on the next row and make the row height of that row
smaller if necessary.

--
Regards,
Tom Ogilvy

"ingineu" wrote in
message ...

I am trying to add a double underline into a specific row (Cell "A" &
row). The row can change so I cannot code the position. Initially I
had the text coded with a double underline, but my user wants some
space between the text and the underline, which led me to try using the
shape object. How would I change the following code:


Code:
--------------------
With Sheets(shtRpt).Shapes.AddLine(0, 100, 132, 100).Line
.Style = msoLineThinThin
.Weight = 3#
End With
--------------------


Thanks.


--
ingineu
------------------------------------------------------------------------
ingineu's Profile:
http://www.excelforum.com/member.php...o&userid=14860
View this thread: http://www.excelforum.com/showthread...hreadid=566295




ingineu[_6_]

Add double underline to row
 

Changing the Row Height does not make a difference to where th
underline appears. The spacing appears the same.

If I put the underline in a separate row, as you suggest, it woul
require text

--
ingine
-----------------------------------------------------------------------
ingineu's Profile: http://www.excelforum.com/member.php...fo&userid=1486
View this thread: http://www.excelforum.com/showthread.php?threadid=56629


Greg Wilson

Add double underline to row
 
Assuming the text is not fixed and is not predicatable and you want the line
length to be the same as the text length, how do you adjust the line length
to achieve this ? The text length is not a function of the number of
characters but is the sum of the individual character widths. And the
character widths are specific to each character (e.g. "W" is much wider than
"i"). This can be done, but is complex and also completely dependant on font
size (8, 9, 10...), style (bold, italic...), type (Arial, Tahoma...), window
zoom. Change any of these parameters and the code you use is wrong and there
is no simple correction factor. In other words, it's highly unlikely that it
will be worth it.

Regards,
Greg



"ingineu" wrote:


I am trying to add a double underline into a specific row (Cell "A" &
row). The row can change so I cannot code the position. Initially I
had the text coded with a double underline, but my user wants some
space between the text and the underline, which led me to try using the
shape object. How would I change the following code:


Code:
--------------------
With Sheets(shtRpt).Shapes.AddLine(0, 100, 132, 100).Line
.Style = msoLineThinThin
.Weight = 3#
End With
--------------------


Thanks.


--
ingineu
------------------------------------------------------------------------
ingineu's Profile: http://www.excelforum.com/member.php...o&userid=14860
View this thread: http://www.excelforum.com/showthread...hreadid=566295



ingineu[_7_]

Add double underline to row
 

The Text will be constant so my width will not change. I would like t
know if there is a command that tells me the position of a specifi
row. I may just have to sum up the row heights to get there

--
ingine
-----------------------------------------------------------------------
ingineu's Profile: http://www.excelforum.com/member.php...fo&userid=1486
View this thread: http://www.excelforum.com/showthread.php?threadid=56629


Tom Ogilvy

Add double underline to row
 
the top of a cell

activeCell.Top

--
Regards,
Tom Ogilvy

"ingineu" wrote in
message ...

The Text will be constant so my width will not change. I would like to
know if there is a command that tells me the position of a specific
row. I may just have to sum up the row heights to get there.


--
ingineu
------------------------------------------------------------------------
ingineu's Profile:
http://www.excelforum.com/member.php...o&userid=14860
View this thread: http://www.excelforum.com/showthread...hreadid=566295





All times are GMT +1. The time now is 09:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com