VBA - using command button to copy userform text boxes to excel spreadsheet

S

stevehorton

Hi there,

I have created a user form in vba that someone would fill in variou
text boxes.

What i now want is the info to be summarised in excel.

The userform is held in sheet 1, so the idea is the user would inpu
the information in the text boxes and then click the command button an
the text boxes information would be copied to indiviual cells i.
textbox1 to a1 on sheet 1.

I have tried by running a macro in excel to see the vb code but tha
does not work for a vba form.

If anyone needs the file let me know and i will attach it
:cool
 
B

Bob Phillips

Add a commandbutton to the from and add code like this to the button

Worksheets("Sheet1").Range("A1").Value = Textbox1.Text

etc.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top