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: 343
Default Return to UserForm

What can I do to take the user back to the UserForm (preferably to TextBox1)
if TextBox1 value is blank?




Private Sub CommandButton1_Click()

Dim rng
Set rng = Cells(ActiveCell.Row, 1)

Application.ScreenUpdating = False

If TextBox1.Value = "" Then
MsgBox "Sorry but you must provide a First Name"

End

End If

Application.ScreenUpdating = False

Range("A1003").Activate
rng(1, 1).Value = TextBox1.Text 'Employee First Name


Unload Add_Name

Sort.SortEmplyees

Application.ScreenUpdating = True

End Sub

 
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
Return Control to Userform Stephen Newman[_2_] Excel Programming 6 January 21st 08 02:32 AM
Return to module after userform Clayman Excel Programming 7 June 19th 07 05:35 PM
Userform Return Key Behaviour JoePineapples Excel Discussion (Misc queries) 1 November 8th 06 01:19 PM
Userform text box return date value? Matt[_39_] Excel Programming 3 July 28th 06 06:29 PM
Userform cannot return any values Nick Excel Programming 6 August 17th 04 05:00 PM


All times are GMT +1. The time now is 08:48 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"