Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default referring to a textbox on a different userform.

I am using two userforms ("ufZipCodeMarket" and "ufRepInfo") and want to
populate the textbox ("tbZipCode2") on userform("ufRepInfo") by entering a
value into the textbox ("tbZipCode") on userform ("ufZipCodeMarket") and
pressing a command button ("cbFind") on that userform. Thank you for you help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 421
Default referring to a textbox on a different userform.

Hi Aintlifegrand79,

In the module of the ufZipCodeMarket
Userform, try pasting the following code:

'=============
Private Sub CommandButton2_Click()
Dim sStr As String

sStr = Me.TextBox1.Value

With ufRepInfo
.Show
.TextBox1.Value = sStr
End With

End Sub
'<<=============



---
Regards.
Norman


"aintlifegrand79" wrote in
message ...
I am using two userforms ("ufZipCodeMarket" and "ufRepInfo") and want to
populate the textbox ("tbZipCode2") on userform("ufRepInfo") by entering a
value into the textbox ("tbZipCode") on userform ("ufZipCodeMarket") and
pressing a command button ("cbFind") on that userform. Thank you for you
help


  #3   Report Post  
Posted to microsoft.public.excel.programming
Ken Ken is offline
external usenet poster
 
Posts: 207
Default referring to a textbox on a different userform.

Maybe this will help:

If you have two userforms, userform1 and userform2, they both have a
textbox1 and one has a commandbutton1. If you have them both shown,
maybe using code like:

Sub test()
UserForm1.Show modal
UserForm2.Show modal
End Sub

If the code associated with the command button on the first userform
is:

Private Sub CommandButton1_Click()
UserForm2.TextBox1.Text = UserForm1.TextBox1.Text
End Sub

and you put some text in textbox 1 on userform1 and click the button,
that text will show up in the textbox on userform2.

Good luck.

Ken
Norfolk, Va

On May 22, 2:13*pm, aintlifegrand79
wrote:
I am using two userforms ("ufZipCodeMarket" and "ufRepInfo") and want to
populate the textbox ("tbZipCode2") on userform("ufRepInfo") by entering a
value into the textbox ("tbZipCode") on userform ("ufZipCodeMarket") and
pressing a command button ("cbFind") on that userform. *Thank you for you help


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
referring to selection from multi-select userform kidkarma Excel Programming 0 March 1st 07 03:09 AM
UserForm referring to another excel file B Smith[_2_] Excel Programming 1 November 6th 05 07:29 AM
Referring to a TextBox Andrew B[_4_] Excel Programming 2 August 23rd 05 12:25 PM
Referring to a TextBox Andrew B[_4_] Excel Programming 1 August 22nd 05 10:34 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


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