can this be done?

S

sam

Can we create forms in excel that would populate the corrensponding fields in
excel sheet? Also if we could create forms, can we make certain fields to be
mandatory?

Thanks a Lot in advance
 
E

Eduardo

Hi,
yes you can make a field mandatory

'check for a project number
If Trim(Me.TxtProjectCode.Value) = "" Then
Me.TxtProjectCode.SetFocus
MsgBox "Please enter a project number"
Exit Sub
End If

To your first question you have to tell where to put the information

'copy the data to the database
.Cells(iRow, 4).Value = Me.TxtProjectname.Value

where 4 is the column where you want the information

To get the first row free

Dim ws As Worksheet
Dim iRow1 As Long

Set ws = Worksheets("Projects")

'find first empty row in database
With ws
iRow = .Cells(.Rows.Count, 3).End(xlUp).Offset(1, 0).Row

if this helps please click yes, thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top