PDA

View Full Version : My first userform



alliejane
08-14-2007, 03:59 PM
Well...sorta. I have a sample user form that someone sent me so that I can copy/learn from it. I also have a book where I'm reading the chapters about user forms. I, however (being blonde) either can not find the answer to my questions or don't know how to ask it properly in the help screens.

The user form has 2 text boxes that are dates. The dates are entered and are then updated on the worksheet.

a) How do I define which worksheet is to be updated with the values in the text boxes? The sample I have is just one page, where my application has 4 sheets.

b) after I figure out how to put the values in the correct worksheet, is it correct to assume that the Data/ControlSource value is where the value will be placed? My sample has data/controlsource = SecondDate and SecondDate is a name in the sample worksheet.

Thanks!

lucas
08-14-2007, 04:20 PM
Hi allijane,
It would help if you could post your workbook so we can give specific help. click on post reply at the bottom left of the last post...post your message and then scroll down and look for the button that says "Manage Attachments"

alliejane
08-14-2007, 04:27 PM
here's the sample

lucas
08-14-2007, 04:51 PM
This should work..

Private Sub cbOK_Click()
Worksheets("Sheet1").Range("B1").Value = date1.Value
Worksheets("Sheet1").Range("B2").Value = date2.Value
Unload Me
End Sub

alliejane
08-14-2007, 05:41 PM
I think I've got it! Thanks!!