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

Hello
I've used the following code to validate an entry into a textbox.

Private Sub TextBox1_Change()
Dim number_of_locations As Integer
If TextBox1 = vbNullString Then Exit Sub
If Not IsNumeric(TextBox1) Then
MsgBox "Sorry, numbers only"
TextBox1 = vbNullString
Else
number_of_locations = val(TextBox1.Value)
addlocations (number_of_locations) ' this prompts a second userform to
appear based on the no of locations
Exit Sub

End If
End Sub

The addlocations sub then unloads the first form and the user enter details
in the second userform. After the information is entered I use a cmd button
to reload the first userform. The problem is that the textbox on form 1 does
not react to any changes. I need a way to reset the textbox.

Any help as always greatly appreciated.

David


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Userform question

Sorry to have troubled anyone but I think I've sorted the problem.
"David Goodall" wrote in message
news:y6Hpc.41$JL5.4@newsfe1-win...
Hello
I've used the following code to validate an entry into a textbox.

Private Sub TextBox1_Change()
Dim number_of_locations As Integer
If TextBox1 = vbNullString Then Exit Sub
If Not IsNumeric(TextBox1) Then
MsgBox "Sorry, numbers only"
TextBox1 = vbNullString
Else
number_of_locations = val(TextBox1.Value)
addlocations (number_of_locations) ' this prompts a second userform

to
appear based on the no of locations
Exit Sub

End If
End Sub

The addlocations sub then unloads the first form and the user enter

details
in the second userform. After the information is entered I use a cmd

button
to reload the first userform. The problem is that the textbox on form 1

does
not react to any changes. I need a way to reset the textbox.

Any help as always greatly appreciated.

David




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
Question regarding UserForm TotallyConfused Excel Discussion (Misc queries) 0 September 3rd 09 09:38 PM
UserForm Question Stockwell43 Excel Discussion (Misc queries) 0 October 27th 08 01:02 PM
Userform Question Greg B Excel Discussion (Misc queries) 3 March 10th 05 10:46 AM
Userform Question Ryan Excel Programming 2 April 30th 04 02:48 AM
UserForm Question abxy[_16_] Excel Programming 2 February 5th 04 07:11 PM


All times are GMT +1. The time now is 08:18 AM.

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

About Us

"It's about Microsoft Excel"