Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike in Philly
 
Posts: n/a
Default Excel Spreadsheet - Mandatory fields

Is there a way to make an Excel spreadsheet not be able to close unless
certain fields are filled in?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Excel Spreadsheet - Mandatory fields

You could put something in the BeforeClose event

Private Sub Workbook_BeforeClose(Cancel As Boolean)

With Worksheets("Sheet1")
If .Range("A1").Value = "" Then
MsgBox "Value not supplied"
Cancel = True
End If
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Mike in Philly" <Mike in wrote in message
...
Is there a way to make an Excel spreadsheet not be able to close unless
certain fields are filled in?



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
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
windows explorer will not open an excel spreadsheet. hal Excel Discussion (Misc queries) 2 June 24th 05 02:07 AM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
How do I export an Excel spreadsheet to Pocket PC (Pocket Excel)?. Selena Excel Discussion (Misc queries) 1 December 7th 04 03:01 AM
Copying an Excel spreadsheet to a Word document KG Excel Discussion (Misc queries) 1 November 28th 04 07:38 PM


All times are GMT +1. The time now is 10:22 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"