SOLVED

How write vba code for three textboxes on form

Iron Contributor

How write vba code for three textboxes on form.

 

Textbox1 get data from worksheet for display on form.

 

Textbox2 get data from worksheet for display on form

 

Textbox3 put data on to worksheet.

 

 

I have a label on the form disregard. I can not delete label from my phone

 

Thanks You.

5 Replies

@sf49ers19238597 

Set the ControlSource property of the text boxes to the cell you want them to be linked to.

If you set the Enabled property of TextBox1 and TextBox2 to False, the text boxes will be for display only.

Leave Enabled set to True for TextBox3. The user will be able to change the value of the linked cell by editing this text box.

HansVogelaar_0-1705667185980.png

@HansVogelaar 

 

textbox1 how write vba code for form get data from worksheet show on textbox1. textbox2 how write vba code for form get data from worksheet show on textbox2. textbox3 how write vba code for form put data into worksheet.

 

How to write vba code to make form to work.

 

 

Thanks You

 

 

@sf49ers19238597 

I showed you how to do that in my previous reply!

@HansVogelaar 

 

 

I try get these codes not working for me one my friend found them

'FORM WORKSHEET TO SHOW ON THE FORM
TextBox1.Value = Worksheets("Sheet1").[A4].Value

TextBox2.Value = Worksheets("Sheet1").[B4].Value

PUT DATA INTO WORKSHEET
Worksheets("Sheet1").[C4].Value=TextBox3.Value 

 

 

Thanks You

 

best response confirmed by sf49ers19238597 (Iron Contributor)
Solution

@sf49ers19238597 

See the attached version.

1 best response

Accepted Solutions
best response confirmed by sf49ers19238597 (Iron Contributor)
Solution

@sf49ers19238597 

See the attached version.

View solution in original post