I want to change the format of the ".Text" property, but then linked cell property is lost. (textColumn and BoundColumn are different)
- I figured out the cause: in the modified format the text is not recognized anymore, so it doesn't know which value to give back to the linked cell and somehow the change event is running 3 times.
But then how can I format only the text property, so it will be a date, and still keeping the linked cell's value as it was?
Seems to me that seperating the text column and bound column formatting destroys things and strange loops are starting.
- I figured out the cause: in the modified format the text is not recognized anymore, so it doesn't know which value to give back to the linked cell and somehow the change event is running 3 times.
But then how can I format only the text property, so it will be a date, and still keeping the linked cell's value as it was?
Seems to me that seperating the text column and bound column formatting destroys things and strange loops are starting.
Code:
Private Sub ComboBox1_Change()
MsgBox "Running"
ComboBox1.Text = Format(ComboBox1.Text, "dd_mmm_yyyy")
End Sub
VBA Code:
Sub test()
With MySheet.ComboBox1
.ListFillRange = "A1:B5"
.LinkedCell = Range("G8").Address
.ColumnCount = 2
.TextColumn = 1 'text showing as selected at the top
.BoundColumn = 2 'linked cell value
End With
End Sub