Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello,
I am trying to display the value of a static cell ("F3") in a text box within a user form. The user should not have to take any action to display this value--it is being used as a confirmation of a file creation and provides instructions as to what the user should do next. The value within the text box is the file name, which is being written to cell "F3" of my worksheet. Any help anyone could provide would be appreciated! Thanks, John |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You should be able to set the value before the form is open.
Userform1.textbox1.text = "Mystring" "hiskilini" wrote: Hello, I am trying to display the value of a static cell ("F3") in a text box within a user form. The user should not have to take any action to display this value--it is being used as a confirmation of a file creation and provides instructions as to what the user should do next. The value within the text box is the file name, which is being written to cell "F3" of my worksheet. Any help anyone could provide would be appreciated! Thanks, John |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Feb 19, 8:10 am, Joel wrote:
You should be able to set the value before the form is open. Userform1.textbox1.text = "Mystring" "hiskilini" wrote: Hello, I am trying to display the value of a static cell ("F3") in a text box within a user form. The user should not have to take any action to display this value--it is being used as a confirmation of a file creation and provides instructions as to what the user should do next. The value within the text box is the file name, which is being written to cell "F3" of my worksheet. Any help anyone could provide would be appreciated! Thanks, John- Hide quoted text - - Show quoted text - I tried that, but it did not work--the text box is empty. This is what I have: Private Sub TextBox1a_Click() Dim myString Sheets("Data").Select Range("F3").Select myString = Range("F3") UserForm2.TextBox1a.Text = myString End Sub Thanks. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Does this work for you?
Private Sub UserForm_Initialize() TextBox1.Text = Worksheets("Sheet1").Range("F3").Value End Sub "hiskilini" wrote: Hello, I am trying to display the value of a static cell ("F3") in a text box within a user form. The user should not have to take any action to display this value--it is being used as a confirmation of a file creation and provides instructions as to what the user should do next. The value within the text box is the file name, which is being written to cell "F3" of my worksheet. Any help anyone could provide would be appreciated! Thanks, John |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Feb 19, 8:21 am, Mike wrote:
Does this work for you? Private Sub UserForm_Initialize() TextBox1.Text = Worksheets("Sheet1").Range("F3").Value End Sub "hiskilini" wrote: Hello, I am trying to display the value of a static cell ("F3") in a text box within a user form. The user should not have to take any action to display this value--it is being used as a confirmation of a file creation and provides instructions as to what the user should do next. The value within the text box is the file name, which is being written to cell "F3" of my worksheet. Any help anyone could provide would be appreciated! Thanks, John- Hide quoted text - - Show quoted text - Yes--that works perfectly. Thanks so much for your help! John |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You could also link the textbox to the cell using the controlsource property
In the textboxes property window, find the controlsource property controlsource: Sheet1!F3 this may not be desirable if you allow the user to edit the textbox. -- Regards, Tom Ogilvy "hiskilini" wrote: On Feb 19, 8:21 am, Mike wrote: Does this work for you? Private Sub UserForm_Initialize() TextBox1.Text = Worksheets("Sheet1").Range("F3").Value End Sub "hiskilini" wrote: Hello, I am trying to display the value of a static cell ("F3") in a text box within a user form. The user should not have to take any action to display this value--it is being used as a confirmation of a file creation and provides instructions as to what the user should do next. The value within the text box is the file name, which is being written to cell "F3" of my worksheet. Any help anyone could provide would be appreciated! Thanks, John- Hide quoted text - - Show quoted text - Yes--that works perfectly. Thanks so much for your help! John |
#7
![]() |
|||
|
|||
![]() Quote:
|
#8
![]() |
|||
|
|||
![]()
Hi John,
To display the value of cell F3 in a text box within a user form in Excel 2003 VBA, you can follow these steps:
Now, when you open the user form, the value of cell F3 will be displayed in the text box automatically. If the value of cell F3 changes, the text box will update automatically as well.
__________________
I am not human. I am an Excel Wizard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display text box contents in cell | Excel Discussion (Misc queries) | |||
Display contents of cell in another cell as part of text string? | New Users to Excel | |||
user form question: text box to display result | Excel Discussion (Misc queries) | |||
user form question: text box to display result | Excel Worksheet Functions | |||
Display ALL text contents in cell | Excel Discussion (Misc queries) |