LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Requiring Cell Content on Save

Copy this to Thisworkbook module.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI _
As Boolean, Cancel As Boolean)
If Application.CountA(Sheets("Sheet1").Range("A1:C1") ) < 3 Then
Cancel = True
MsgBox "Please fill required cells, save has been cancelled"
End If
End Sub

To access that module right-click on the Excel Icon left of "File" on the
menubar.

Select "View Code". Paste into that module.

Edit the sheetname and range of cells to suit.

Alt + q to return to the Excel window after editing.

Note: if user disables macros the above won't run.


Gord Dibben MS Excel MVP

On Wed, 2 Jul 2008 15:26:00 -0700, The Chad <The
wrote:

I'm creating a 12 question survey in Excel and want to find a way to require
users to provide responses in specific cells. Ideally, I'd like to run a
check on cells I'm requiring a response in and make sure those specific cells
are not blank. If they are blank, I'd like to generate a dialog box warning
that requires them to populate the cells when they try to save the file.

Not sure how to best do this, any suggestions?

Cheers,


 
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
Sum Problem requiring help NoodNutt Excel Worksheet Functions 6 May 2nd 08 05:23 PM
Requiring data in certain cells jerminski73 Excel Worksheet Functions 2 November 21st 07 02:03 PM
copy comment content to cell content as data not as comment Lilach Excel Discussion (Misc queries) 2 June 21st 07 12:28 PM
requiring a field cherrynich Excel Worksheet Functions 1 July 10th 06 10:00 PM
Formula requiring two different criterias MJMP Excel Worksheet Functions 8 March 1st 05 10:13 PM


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