Hello,
I would show right,wrong marks in combobox1 and in last column in listbox1 based on showing in column I
currently show O,P letters , how can I fix it please?
thanks
Hello,
I would show right,wrong marks in combobox1 and in last column in listbox1 based on showing in column I
currently show O,P letters , how can I fix it please?
thanks
Abdo
I think Willie's solution is good but If you don't like it, a solution would be to set column I to a regular font (instead of Webdings2) and use the square root symbol (√) for a tick (or check) and "x" for your cross. Better still, use data validation on column I to limit inputs to those values.
Your ListBox1 uses Tahoma font currently so will show √ and x values.
Revision #1, 02 November 2025
In the attached file, ListBox1 contains only the data rows- the headers are in a (seemingly) transparent ListBox3, above and grouped with it (so resizes if you change the width say).
In the worksheet, cell !1 uses your font but the bordered cells below that use Tahoma font (like ListBox1) since it displays the square root symbol correctly. Those cells have (List) Data Vaidation so a dropdown list lets you pick √ easily.
I added two new rows without entries in column A but if you click the button "Launch form" these will be displayed (and you can select a complete row).
It does that since I changed the way VBA finds the last used row (if your headers are in row 1)- see below, with comments:
Private Sub UserForm_Initialize()
Dim LastRow As Long, Cols As String
LastRow = Range("A1").CurrentRegion.Rows.Count 'find last used row (don't rely on column A in A
Cols = "30;70;100;70;70;70;70;60;20" ' set common widths
With ListBox1
.ColumnCount = 9 ' make columns
.ColumnWidths = Cols ' fix common column widths
.List = Range("A2:I" & LastRow).Value ' get data
End With
With ListBox3
.ColumnCount = 9 ' make header columns
.ColumnWidths = Cols 'fix common column widths
.List = Range("A1:I1").Value ' get headings
End With
End Sub
Hope this helps.
LastRow = Sheets("ASS").Range("A" & Rows.Count).End(xlUp).Row returns the row number of the last cell incolumn "A". If you omit the list numbers in column "A" it will return "7". It's imperitive to add numbers in column "A" to get the complete results.Hello again Abdo M,
If you look at a cell in Column "I" you will see the font is set to "Windings2". In Wingdings2 an "O" shows as an "X" and a "P" shows as a checkmark. If that is what you want in your userform then do the following:
In the VB Editor open the userform. Select "ComboBox1" on the form. Then in the properties window at the left scroll down to "Font" and change the setting from "Tahoma" to "Wingdings2".
Doing this for "ListBox1" will fix things for the "Case" column but will create jibberish for all other columns. I don't know of a way to change the font for a single column in a ListBox. You would need to modify your form to have a second ListBox for colimn "I" data. Listbox1 would be for columns "A" thru "H". You could place ListBox2 beside ListBox1 so they appear as one ListBox.
UPDATE Oct 31 19:45
While updating your file to have the userform show the details as you prefer, I realized I had to add 2 ListBoxes. One to serve as the header "CASE" and the second to list the checkmarks and X's. I also had to increase the font size in ListBox3 to 9 so everything lines up nicely.
I have attached my revision so you can see how things look.
UPDATED Nov. 2/25 10:44
Added file CHECKMARKS Rev1-B.xlsm
If this solves things for you please mark my answer as Selected.
Cheers :-)