Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default Stop user from saving workbook unless cell is filled in

I created an account form in Excel that is filled in by others when they want
a new account to be set up.
There is one cell in particular that they have to fill in, but very often do
not. I was hoping there was something in Excel that would stop them from
saving the spreadsheet unless this cell is filled in.
Any help would be appreciated.

Thanks so much.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Stop user from saving workbook unless cell is filled in

Hi,

Alt +F11 to open VB editor, double click 'This Workbook' and paste this in
on the right. Change the cell to the one you want and tidy up the message

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Not IsDate(Sheets("Sheet1").Range("A1").Value) Then
MsgBox "You must fill in cell xxxxxx"
Cancel = True
End If
End Sub

Mike

"Churley" wrote:

I created an account form in Excel that is filled in by others when they want
a new account to be set up.
There is one cell in particular that they have to fill in, but very often do
not. I was hoping there was something in Excel that would stop them from
saving the spreadsheet unless this cell is filled in.
Any help would be appreciated.

Thanks so much.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default Stop user from saving workbook unless cell is filled in

Mike H,

Thanks so much. This worked fine.


"Mike H" wrote:

Hi,

Alt +F11 to open VB editor, double click 'This Workbook' and paste this in
on the right. Change the cell to the one you want and tidy up the message

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Not IsDate(Sheets("Sheet1").Range("A1").Value) Then
MsgBox "You must fill in cell xxxxxx"
Cancel = True
End If
End Sub

Mike

"Churley" wrote:

I created an account form in Excel that is filled in by others when they want
a new account to be set up.
There is one cell in particular that they have to fill in, but very often do
not. I was hoping there was something in Excel that would stop them from
saving the spreadsheet unless this cell is filled in.
Any help would be appreciated.

Thanks so much.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Stop user from saving workbook unless cell is filled in

Glad I could help

"Churley" wrote:

Mike H,

Thanks so much. This worked fine.


"Mike H" wrote:

Hi,

Alt +F11 to open VB editor, double click 'This Workbook' and paste this in
on the right. Change the cell to the one you want and tidy up the message

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Not IsDate(Sheets("Sheet1").Range("A1").Value) Then
MsgBox "You must fill in cell xxxxxx"
Cancel = True
End If
End Sub

Mike

"Churley" wrote:

I created an account form in Excel that is filled in by others when they want
a new account to be set up.
There is one cell in particular that they have to fill in, but very often do
not. I was hoping there was something in Excel that would stop them from
saving the spreadsheet unless this cell is filled in.
Any help would be appreciated.

Thanks so much.

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
My hyperlinks stop working on saving the workbook RobDLondon Excel Discussion (Misc queries) 2 September 11th 06 02:46 PM
Losing Cell Protection When Saving Workbook Chaplain Doug Excel Discussion (Misc queries) 5 August 23rd 06 12:28 AM
Using macro to stop user from emailing workbook scooppbear Excel Discussion (Misc queries) 1 May 17th 06 05:43 AM
Prevent user from saving workbook keithl816 Excel Discussion (Misc queries) 3 January 15th 06 10:24 PM
I want a macro to save a workbook as a user inputted cell EAHRENS Excel Discussion (Misc queries) 3 November 8th 05 03:28 PM


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