ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   I have had trouble with textbox text to worksheet (https://www.excelbanter.com/excel-discussion-misc-queries/16951-i-have-had-trouble-textbox-text-worksheet.html)

Thomas

I have had trouble with textbox text to worksheet
 
I am having trouble with textboxes in my userform. I would like to copy the
text from several textbox in the userform I set up in Visual Basic into the
proper cells on my worksheet. I have tried a couple of different ways but I
must be missing a step. Can anyone help???

OJ

Hi,
assuming you want to do it on the click of a button then..

Private Sub CommandButton1_Click()
ThisWorkbook.Sheets(1).Cells(1, 1).Value = Me.TextBox1.Value
End Sub

Where TextBox1 is your textbox...

Hth,
Oli



All times are GMT +1. The time now is 05:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com