Text box not updating

ThomasA83

Board Regular
Joined
Mar 10, 2009
Messages
95
I have tried to search the answer, however didn't suceed to find one yet.

I have 3 text boxes, which is set to show the following:

TextBox1 = B36
TextBox2 = E36
TextBox3 = G36

B36, E36 and G36, change value each time the dropdown menu's in B6, E6 or G6 are changed. However it doesn't update in the TextBoxes, only if I click the TextBoes afterwards.

Anyone have an idea how to solve it?

Brgds
Thomas
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hi,

I actually have been having the same problem, it is weird. Did you enter your textboxes through shapes? Or is it a ActiveX control textbox?
 
Upvote 0
Also,

I don't know if you are working with VBA or macros, but I was thinking a way around it could be to run a macro that would click inside all of the textboxes for you. I have not come up with a code just yet for that, I have been stuck looking through forums myself, but maybe you can try looking for something that does that.
 
Upvote 0
I am not skilled enough with macro's yet. But if someone could create a code for the macro to activate each 3 TextBox when you open the Worksheet, then the TextBoxes refreshed whenever the parametres changes.
Is that possible? The name of the TextBoxes is TextBox1, TextBox2, TextBox3.
 
Upvote 0
Ok, well this is what I came up with and I hope it helps. I still don't know why it wont update but if you change your text boxes to ActiveX control text boxes than you can update them using a VBA code. I am not sure if this is an option for you but I changed all of my text boxes to ActiveX control text boxes and used this code and it works like a charm.

PHP:
Private Sub Workbook_Open ()

TextBox1.Text = Range("B36").Text
TextBox2.Text = Range("E36").Text
TextBox3.Text = Range("G36").Text

End Sub

This will run the macro when the workbook opens.
 
Upvote 0
Thanks, I will check tomorrow at work if I can get it to work.

Just to be sure, how do I change to an ActiveX Text box?
 
Upvote 0
You will have to insert a completely new text box, and name it what you want.

It is under the developer tab, click insert and under "ActiveX controls" it is a button that has "ab" on it. To rename it click on "Design Mode" in the developer tab as well and right click on the text box and click properties then in the window you can edit the text box however you need to.
 
Upvote 0
Thanks, think I know what you refer to.

And the macro I copy/paste in VBA under workbook.

Will let you know tomorrow if it works for me.
 
Upvote 0

Forum statistics

Threads
1,225,072
Messages
6,182,699
Members
453,132
Latest member
nsnodgrass73

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top