?
Solved

How to setFocus with out closing the Exe.

Posted on 2004-09-28
2
Medium Priority
?
180 Views
Last Modified: 2010-04-23
I have the code below that I would like it to set focus on a radio button if certain criteria’s are met.  But what keeps happening is when i get to the end command the Exe closes.          

         If Me.RadioButton1.Checked = True Then
                MsgBox("You have selected to send a test to LAStageTIX.  You must select HTML format for that action.")
                Me.RadioButton2.Focus()
                End
            Else
                newMail.Body = emailHeader & emailSubscribe & emailFooter
            End If


Thanks for your help.
0
Comment
Question by:GabicusC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 14

Expert Comment

by:ptakja
ID: 12174907
The problem is the "End" statement after your focus call.

         If Me.RadioButton1.Checked = True Then
                MsgBox("You have selected to send a test to LAStageTIX.  You must select HTML format for that action.")
                Me.RadioButton2.Focus()
                End  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
            Else
                newMail.Body = emailHeader & emailSubscribe & emailFooter
            End If

Change it to this and you should be good to go.

         If Me.RadioButton1.Checked = True Then
                MsgBox("You have selected to send a test to LAStageTIX.  You must select HTML format for that action.")
                Me.RadioButton2.Focus()
            Else
                newMail.Body = emailHeader & emailSubscribe & emailFooter
            End If
0
 
LVL 14

Accepted Solution

by:
ptakja earned 1400 total points
ID: 12174910
The "End" statement kills the app!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question