LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default EASYOptionButton Select Error

Hi Folks,

I'm trying to save my users from themselves by forcing them down a path with
choices. Specifically I've created a form that asks for a selection. The
selections will take them to the appropriate sheet to the next step. All my
sheets are hidden until necessary and so far it's nice and clean.

Everything works great except if there is no selection made from the initial
choices. If no choice is made and the user click the OK button, the form
closes and they are stuck. See code below...

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
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.

Any ideas?


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use optionbutton value to select code to run. Casey[_91_] Excel Programming 5 May 10th 06 11:00 PM
Range.Select error and screen maximizing error in Workbook_Open() Punsterr Excel Programming 3 May 10th 06 10:16 PM
Range.Select error and screen maximizing error in Workbook_Open() Punsterr Excel Programming 0 May 10th 06 07:56 PM
easy one - select a cell Kevin Excel Programming 3 October 3rd 05 02:29 PM
SendKeys command to select an OptionButton Fred Russell Excel Programming 6 August 6th 05 01:09 AM


All times are GMT +1. The time now is 04:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"