Command Button and Text Box VBA

Makky_05

New Member
Joined
Mar 3, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
Hello Everyone ,

I am creating a Userform in which when I select a particular command button, a certain text that I want is entered in the textbox.
I also created another command button2 to remove the text from the text box but am unable to do so.
Can you please help me with the code of removing the text from the textbox when I select command button2?

Any help will be appreciated . Thankyou all in advance.
 

Attachments

  • img2.png
    img2.png
    18.9 KB · Views: 9

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Thankyou so much for replying back to me . Very much appreciated.
 
Upvote 0
VBA Code:
TextBox1.Text=""
DoEvents
When I applied this code my other command button which allows text to appear in text box do not work .I want both my command buttons to work- 1. that will put the text in text box 2. One that will remove the text from the text box.
 
Upvote 0

Forum statistics

Threads
1,215,065
Messages
6,122,944
Members
449,095
Latest member
nmaske

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