
Originally Posted by
Patrick Simonds
Any ideas why the code below would not work. The referenced cell (1,13) will
either be blank, show 00:30 or 01:00.
These values were placed in the cell with the following code:
Dim lngValue 'As Long
If OptionButton1.Value Then lngValue = ""
If OptionButton2.Value Then lngValue = TimeSerial(0, 30, 0)
If OptionButton3.Value Then lngValue = TimeSerial(0, 60, 0)
rng(1, 13).Value = lngValue
Private Sub UserForm_Initialize()
Dim rng
Set rng = Cells(ActiveCell.Row, 1)
With ActiveCell.Offset(1, 13)
If .Value = "" Then
OptionButton1.Value = True
ElseIf .Value = TimeSerial(0, 30, 0) Then
OptionButton2.Value = True
ElseIf .Value = TimeSerial(0, 60, 0) Then
OptionButton3.Value = True
End If
End With
End Sub
Bookmarks