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

i want my colleagues to mandatory fill in a cell before saving. is
this possible? (sorry for my poor english)
thanks
bta
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default mandatory cell

bta,

Copy the code below, and paste it into the codemodule of the ThisWorkbook object. See

http://www.mvps.org/dmcritchie/excel/event.htm

if you are not familiar with event coding.

This code will require cell A1 of Sheet1 be filled in before the file will be saved.

HTH,
Bernie
MS Excel MVP


Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Worksheets("Sheet1").Range("A1").Value = "" Then
MsgBox "Fill in cell A1 on Sheet1 !!!!"
Cancel = True
MsgBox "File is not saved yet!"
End If
End Sub

wrote in message
...
i want my colleagues to mandatory fill in a cell before saving. is
this possible? (sorry for my poor english)
thanks
bta



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
Mandatory cell Jeff Excel Discussion (Misc queries) 13 February 5th 07 04:02 PM
Cell to be mandatory fill in CBrausa Excel Discussion (Misc queries) 13 May 9th 06 11:46 PM
Cell to be mandatory fill in CBrausa Excel Discussion (Misc queries) 7 March 10th 06 02:09 PM
How can I make a cell mandatory? [email protected] Excel Discussion (Misc queries) 3 February 6th 06 11:01 PM
Making Cell Entry Mandatory Sue T Excel Discussion (Misc queries) 4 August 17th 05 03:45 PM


All times are GMT +1. The time now is 08:33 AM.

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"