Hello everyone,
I'm filling up a listbox by concatenating several strings from my Excel database, this concatenated string is being filled into the listbox by .additem and everything is working fine.
My issue is, that I would like the first Word in every concatenated string to be Bold and maby even with a larger font size, but I can't figure out how to do this.
I was hoping there would be an easy way to do this, maby by telling that str_C should be Bold (something like "font.bolt(str_C)=True"), anyone have any suggestion?
This is the code I wrote...
Private Sub cbo_SelectGroup_Change()
xRow = 2
xColumn = 3
zRow = 1
zColumn = 3
str_A = cbo_SelectGroup.Value
Select Case str_A
Case Is = "Melee - Blades"
'(i.e. "Combat axe | Accuracy: 4 | Reach: 2 | Damage: (Str + 5) P | AP: -4 | Avail: 12R | Cost: 4000")
'Clear List
lst_EquipmentList.Clear
'Item name (i.e. "Combat axe")
xRow = 2
xColumn = 3
'Sub-header (i.e. "Accuracy")
zRow = 1
zColumn = 4
'Sub-header value (i.e. "4")
yRow = 2
yColumn = 4
'Divider ( | )
str_B = " | "
For int_A = 1 To 999
Do
'Load condition for stopping loop
var_Stop = Worksheets("db_Blade").Cells(zRow, zColumn + 1)
'Load Item name into string
str_C = Worksheets("db_Blade").Cells(xRow, xColumn)
'Load Sub-header into string
str_D = Worksheets("db_Blade").Cells(zRow, zColumn) & ": "
'Load Sub-header value into variable
var_A = Worksheets("db_Blade").Cells(yRow, yColumn)
'Concatenate string
str_E = str_E & str_B & str_D & var_A
xRow = xRow + 0
xColumn = xColumn + 0
zRow = zRow + 0
zColumn = zColumn + 1
yRow = yRow + 0
yColumn = yColumn + 1
Loop Until var_Stop = ""
'Add Item name infront of concatenated string
str_F = str_C & str_E
'Load Completed string into listbox
If str_C <> "" Then
With lst_EquipmentList
.AddItem str_F
End With
Else
End If
'Reset Dim
str_C = ""
str_D = ""
str_E = ""
str_F = ""
var_A = ""
'Next set of coordinates
xRow = xRow + 1
xColumn = 3
'Next set of coordinates
zRow = 1
zColumn = 4
'Next set of coordinates
yRow = yRow + 1
yColumn = 4
Next int_A
End Select
End Sub
Kind Regard
Martin Kristensen
Bookmarks