Hi all,
I've pretty limited skills when it comes to VB, so enlisted the aid of a colleague when I wanted values in the drop down list to be shown as hh:mm format. FYI a named range is feeding the drop down list & there were issues getting it to appear as hh:mm.
Below is what he came up with, it works but is laggy now that I have 6 of the same comboboxes on the same worksheet.
Can anyone suggest refinements or alternatives please?
Many thanks,
AP
-----------
Private Sub ComboBox88_Change()
On Error GoTo errorhandler
If Range("L37") <> "" Then
Range("L37") = CDbl(ComboBox88.Value)
ComboBox88.Value = Format(ComboBox88.Value, "hh:mm")
Else
Range("L37").Value = ""
End If
Exit Sub
errorhandler:
If Err.Number = 13 Then Exit Sub
End Sub
I've pretty limited skills when it comes to VB, so enlisted the aid of a colleague when I wanted values in the drop down list to be shown as hh:mm format. FYI a named range is feeding the drop down list & there were issues getting it to appear as hh:mm.
Below is what he came up with, it works but is laggy now that I have 6 of the same comboboxes on the same worksheet.
Can anyone suggest refinements or alternatives please?
Many thanks,
AP
-----------
Private Sub ComboBox88_Change()
On Error GoTo errorhandler
If Range("L37") <> "" Then
Range("L37") = CDbl(ComboBox88.Value)
ComboBox88.Value = Format(ComboBox88.Value, "hh:mm")
Else
Range("L37").Value = ""
End If
Exit Sub
errorhandler:
If Err.Number = 13 Then Exit Sub
End Sub