Code does not call calendar when option button is checked.If option button is checked and H11 has no data it calls calendar to insert date. This form has two dates that are controlled by what button is selected.If I select optionbutton 2 its does not call call calendar like it does with option bitton one.?? Here is what I have now,option button1 is always first,but if I do it backwards and use button 2 it works?
This is part of a larger code running
If Range("H11").Text = "" Then
testtwoday.Show
Cancel = True
Unload Me
End If
If Range("H11").Text = "" Then
testtwoday.Show
Cancel = True
Unload Me
End If
If Sheets("Two Day").OptionButton1.Value = True And ActiveSheet.Range("H11") = "" Then
Call MsgBox(" Install the Rough Date?", vbCritical + vbOKOnly)
Cancel = True
Exit Sub
End If
If Sheets("Two Day").OptionButton2.Value = True And ActiveSheet.Range("H12") = "" Then
Call MsgBox(" Install the Finish Date?", vbCritical + vbOKOnly)
Cancel = True
Exit Sub
End If
Private Sub CommandButton2_Click()
If Sheets("Two Day").OptionButton1.Value = True And ActiveSheet.Range("H11") = "" Then
Range("H11").Select
Cancel = True
Unload Me
End If
If Sheets("Two Day").OptionButton2.Value = True And ActiveSheet.Range("H12") = "" Then
Range("H12").Select
Cancel = True
Unload Me
End If
End Sub
Bookmarks