View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Susan Susan is offline
external usenet poster
 
Posts: 1,117
Default EASYOptionButton Select Error

stephen -
try adding one more elseif..............

Public Sub CompanySelect()

Dim frm As New frmCompanySelect
'Dim s As String

frm.Show

If frm.btnCORP.Value = True Then
Sheets("Query CORP").Visible = True
Sheets("Query CORP").Select
Range("D6").Select

ElseIf frm.btnNJ.Value = True Then
Sheets("Query NJ").Visible = True
Sheets("Query NJ").Select
Range("D6").Select

ElseIf frm.btnVA.Value = True Then
Sheets("Query VA").Visible = True
Sheets("Query VA").Select
Range("D6").Select


elseif frm.btnCORP.value = false and _
frm.btnNJ.value = false and _
frm.btnVA.value = false then
msgbox "One option must be chosen!"
exit sub

End If



Also, I'd like to put a "Back To Choices" button on each sheet that will
invoke the form again and a simple... "Call companySelect- is not doing it.


back to choices button, just have button re-load the userform; in
the userform initialization (i assume) all your option buttons are set
to false, so they'll be able to start again.

re-reading your post i don't think i've understood you quite
correctly, but the ideas should still help you out, even if i've got
them in the wrong places.
:)
susan