#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default mandatory field

I have a sheet for user to input data. However filed in column C,D,H and J
are mandatory.
The file shouldnt save if data isnt entered into any of these columns.

any help

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default mandatory field

Particular sheet____________
Particular row_____________

Put this in the ThisWorkbook module

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
If Application.CountA(Sheets("sheet9").Range("c2,d2,h 2,j2")) < 4 Then
Cancel = True
MsgBox "Not finished"
End If
End Sub

--
Don Guillett
SalesAid Software

"flow23" wrote in message
...
I have a sheet for user to input data. However filed in column C,D,H and J
are mandatory.
The file shouldnt save if data isnt entered into any of these columns.

any help



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default mandatory field

well thats the problem, the user can go on creating rows and rows of data.
but in the end when he/she saves, the columns for those rows should have
some data.



"Don Guillett" wrote:

Particular sheet____________
Particular row_____________

Put this in the ThisWorkbook module

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
If Application.CountA(Sheets("sheet9").Range("c2,d2,h 2,j2")) < 4 Then
Cancel = True
MsgBox "Not finished"
End If
End Sub

--
Don Guillett
SalesAid Software

"flow23" wrote in message
...
I have a sheet for user to input data. However filed in column C,D,H and J
are mandatory.
The file shouldnt save if data isnt entered into any of these columns.

any help




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default mandatory field

When do you consider a row "Created"?

HTH,
Bernie
MS Excel MVP


"flow23" wrote in message
...
well thats the problem, the user can go on creating rows and rows of data.
but in the end when he/she saves, the columns for those rows should have
some data.



"Don Guillett" wrote:

Particular sheet____________
Particular row_____________

Put this in the ThisWorkbook module

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
If Application.CountA(Sheets("sheet9").Range("c2,d2,h 2,j2")) < 4 Then
Cancel = True
MsgBox "Not finished"
End If
End Sub

--
Don Guillett
SalesAid Software

"flow23" wrote in message
...
I have a sheet for user to input data. However filed in column C,D,H and J
are mandatory.
The file shouldnt save if data isnt entered into any of these columns.

any help






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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display the source for a pivot table page field Gary Brown Excel Worksheet Functions 4 November 8th 06 03:02 PM
Unable to change field settings in calculated field in a pivot tab Mike Excel Discussion (Misc queries) 0 September 25th 06 07:45 PM
data in primay field changed however subsequent field does not upd tan Excel Discussion (Misc queries) 1 July 24th 06 07:07 PM
How can I show all field data in a pivot table, instead of blank Alastair Scott Excel Discussion (Misc queries) 3 August 17th 05 07:08 PM
how do you set up a mandatory field in Excel? Lisa Excel Discussion (Misc queries) 2 November 30th 04 11:20 PM


All times are GMT +1. The time now is 08:43 PM.

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

About Us

"It's about Microsoft Excel"