ListView Query

cdchapman

Board Regular
Joined
Dec 30, 2010
Messages
112
Hi,

Not sure if this is possible, but is there any way of inserting a horizontal line between rows of data in a Listview control on a userform?

At present the listview displays data as below:

Title 1 Title 2 Title 3
Data1 Data 2 Data 3
...
...
TOTALS Total 1 Total 2

The totals line is displayed using a different font colour from the rest of the data which is fine, but it would look better if there was a horizontal line separating the totals from the rest of the data, something like:

Title 1 Title 2 Title 3
Data1 Data 2 Data 3
...
...
________________________
TOTALS Total 1 Total 2

I've tried adding the horizontal line using the "_" character in a ListItem, but this has breaks at each column - does anyone know if it is possible to make the line continuous (in effect merging the columns just for that line)?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Maybe add the character to each element?

x = "Title 1" & "|"

then add x to the listview? add spaces and such as needed.
 
Upvote 0
Thanks for the suggestion Flammy, but this will add a vertical line separating the columns won't it? Also my listview uses a non-proportional font, so I don't think the "|" characters will line up correctly to form a line anyway even with spaces added.

I ideally need an unbroken horizontal line separating the totals from the rest of the data, not a vertical line.
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,423
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top