Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default GoTo statement question

Is there any way to have my GoTo statement goto a label that is defined in
my UserForm1 code? UserForm1 is active when the code below is run.


Sub MissingDataTest()

With UserForm1

If .Frame1.BackColor = &H80FFFF Then
msgbox "Sorry but you must enter a Status for this no show. Ensure
that all other Yellow fields are completed."
.MultiPage1.Value = 0
.Frame1.SetFocus
GoTo MissingData
End If

End With

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default GoTo statement question

GOTO are horrible IMHO, and their only use, regretfully is for the ON ERROR
statement.
So having got that off my chest ;)
Yuu could make MissingData a subroutine. There's no subsequent code, so when
it returns it wan't be an issue.



"Patrick C. Simonds" wrote:

Is there any way to have my GoTo statement goto a label that is defined in
my UserForm1 code? UserForm1 is active when the code below is run.


Sub MissingDataTest()

With UserForm1

If .Frame1.BackColor = &H80FFFF Then
msgbox "Sorry but you must enter a Status for this no show. Ensure
that all other Yellow fields are completed."
.MultiPage1.Value = 0
.Frame1.SetFocus
GoTo MissingData
End If

End With

End Sub

Reply
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
On Error GoTo Question QuietMan Excel Programming 4 September 8th 09 05:30 PM
goto statement in VBA Laurie Excel Programming 10 July 8th 08 10:34 PM
On error GoTo Question Les Stout[_2_] Excel Programming 4 March 8th 07 03:31 PM
goto (F5) question dford Excel Discussion (Misc queries) 2 January 13th 07 04:54 AM
Goto statement in an IF function =\ Excel Worksheet Functions 2 August 11th 05 06:21 PM


All times are GMT +1. The time now is 07:15 AM.

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"