Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Partially color the name of a listcolumn

I want to partially color the fourth column of the table object Sales after the 3 to the end to vbBlack. Currently, the entire column name font color is white. I’m trying the following, but it gives me an error saying an object is required.

length = Len(Worksheets("Sales").ListObjects("Sales").ListColumns(4).Name)

Worksheets("Sales").ListObjects("Sales").ListColumns(4).Name.Characters(Start:= 4, Length:=L).Font.Color = vbBlack

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

ListColumn.Name is a String and a String doesn’t have a Characters collection.

Maybe

With Worksheets("Sales").ListObjects("Sales").ListColumns(4)
    L = Len(.Name)
    .Range.Cells(1).Characters(Start:= 4, Length:=L).Font.Color = vbBlack
End With
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading