Solved

How to setFocus with out closing the Exe.

Posted on 2004-09-28
2
174 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
  • 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 350 total points
ID: 12174910
The "End" statement kills the app!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

759 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now