TextBox change event

boya

New Member
Joined
Jul 15, 2010
Messages
12
Good afternoon all,
Is there a way in a userform where a value has been entered into "textbox1" and then into "textbox2". After which when someone decides to change its mind and once again change value in "textbox1", then "textbox2" should reset/ clear itself of the previous entered value.
eg:
First Manual entry into textbox of numbers:
Textbox1.value = 10
textbox2.value=20

a change in thought occurs and the person changes Textbox1.value = 15.
On this change, the value in textbox2 should automatically reset/clear.

I guess this is a change even procedure (afterupdate), but i am not really familiar with change event procedures.
All help is appreciated.
regards,
Sebastian
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
<font face=Courier New><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> TextBox1_Change()<br>    Me.TextBox2.Value = vbNullString<br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br></FONT>
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

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