Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I set values from a userform
I have a userform with three controls.
I would like the entries in these controls to be placed in the next blank row of a worksheet on the click on the ok button. Q1, How do I find the next blank row in the list Q2. How do I copy the values from the userform to the row found in Q1 Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I set values from a userform
Newbie wrote:
I have a userform with three controls. I would like the entries in these controls to be placed in the next blank row of a worksheet on the click on the ok button. Q1, How do I find the next blank row in the list Q2. How do I copy the values from the userform to the row found in Q1 Supposing the list starts in A1 of the first sheet, the three textboxs are Textbox1, Textbox2, Textbox3 and the button is named cmdOK: Private Sub cmdOK_Click() Dim FirstBlankCell As Range 'Answer to Q1 Set FirstBlankCell = Sheets(1).Range("B6").End(xlDown).Offset(1, 0) 'Answer to Q2 FirstBlankCell.Offset(0,0) = Textbox1 FirstBlankCell.Offset(0,1) = Textbox2 FirstBlankCell.Offset(0,2) = Textbox3 End Sub Regards, -- Beto Reply: Erase between the dot (inclusive) and the @. Responder: Borra la frase obvia y el punto previo. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using values from macro to userform | Excel Worksheet Functions | |||
Userform Initialize & combo box values | Excel Discussion (Misc queries) | |||
Displaying cell values in a Userform | Excel Discussion (Misc queries) | |||
Userform for displaying values from a row | Excel Discussion (Misc queries) | |||
Userform and passing date values | Excel Programming |