data from userform into worksheet cells

  • Thread starter Thread starter Newbie1
  • Start date Start date
N

Newbie1

Hi everyone

I am trying to create an Excel database.
I have created a userform with several text boxes and combo boxes. This
runs on opening the file.
My plan is to be able to click on a command button and have the boxes
contents go to the next empty row on the sheet.
I have managed to create code to select the first cell of the empty row and
fill "A" with a sequential number.
How do I fill the row with the data from the boxes???

All advice accepted!

Kenny
 
assume you have the cell with A selected

SeqNo = SeqNo + 1
Cells(rows.count,1).End(xlup).Offset(0,1).Select
With Userform1
ActiveCell.Value = SeqNo
ActiveCell.offset(0,1).Value = .Textbox2.Text
ActiveCell.Offset(0,2).Value = .Combobox1.Value
ActiveCell.Offset(0,3).Value = .Textbox3.Text
End With
 
Hi Kenny

Here are some links that Tom posted

*************************************
Here are some sources of information:

http://support.microsoft.com/default.aspx?kbid=161514
XL97: How to Use a UserForm for Entering Data

http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data

http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.

http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q168067
File Title: Microsoft(R) Visual Basic(R) for Applications Examples for
Controlling UserForms in Microsoft Excel 97
File Name: WE1163.EXE
File Size: 161742 bytes
File Date: 05/08/97
Keywords: kbfile
Description: This Application Note is an introduction to manipulating
UserForms in Microsoft Excel 97. It includes examples and Microsoft Visual
Basic for Applications macros that show you how to take advantage of the
capabilities of UserForms and use each of the ActiveX controls that are
available for UserForms

Peter Aiken Articles:
Part I
http://msdn.microsoft.com/library/en-us/dnoffpro01/html/IntroductiontoUserFormsPartI.asp
Part II
http://msdn.microsoft.com/library/en-us/dnoffsol02/html/IntroductiontoUserFormsPartII.asp
 
Back
Top