I am trying to execute a program using if else statement on an option button to open a userform on a command button click. The following userforms are named as drilling, milling and so on. The trouble I am having is, the vba tell me my if else statements are wrong could some one show me the right way if i am doing something wrong
![]()
Private Sub Ok_Click() If Drilling.Value = True Then Drilling.Show ElseIf Milling.Value = True Then Milling.Show ElseIf Turning.Value = True Then Turning.Show ElseIf Reaming.Value = True Then Reaming.Show ElseIf Boring.Value = True Then Boring.Show End If End Sub
Bookmarks