Hi All,
In a UserFrom, I have a TextBox link to cell "A1"
When I open the UserFrom, I would like to see the actual value in "A1".
Of course, I would like to be able to change the value from the UserForm !!
Thanks
RV
Hi All,
In a UserFrom, I have a TextBox link to cell "A1"
When I open the UserFrom, I would like to see the actual value in "A1".
Of course, I would like to be able to change the value from the UserForm !!
Thanks
RV
Go to properties of the textbox by right clicking it and set the control source property value to a1
Hello Herve_Rob,
Check the ControlSource property of the TextBox.
Assuming the cell you want to link to is on Sheet1, it should like this...
'Sheet1'!$A$1
Excel will automatically update the TextBox when the UserForm is Activated, or the cell contents change. Also, if you type anything into the TextBox the cell will automatically reflect the change.
Sincerely,
Leith Ross
Hi,
When I try to put something in ControlSource (under Data), a window pop-up with :
"Could not set the ControlSource property. Invalid property values."
i prefer a different way of doing the same thing...
instead of calling this cell A1 name it as "sample", for instance.
then write this code under the userform initialize (if you are not sure where to write it, double click the userform, it will show you "Private Sub userform_click()" then you switch it to initialize)
Private Sub userform_initialize()
textbox.controlsource = "sample"
end sub
it will do the same thing as writen above, but im not sure if the other method will let you link the textbox straight to a named cell, no matter in witch sheet you have the info.
hope this help you out.
MP
Here is the file and still the same.
Do not understand
Hello Herve_Rob,
The main problem is the workbook you are trying to modify is a Shared and Protected. This automatically prevents you from changing the worksheet.
Second, you named the worksheet "A1". The ControlSource property should be...
TextBox1.ControlSource = "'A1'!$A$1"
Until you create your own workbook and place the code in it. it won't work.
Sincerely,
Leith Ross
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks