Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,276
Default can this be done?

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

"sam" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"