Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does anybody have an example of VBA code that looks at certain cells
when a person clicks Save or Save as and if the cell is blank it will display a message and not allow a save? Any help would be greatly appreciated. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Paste the code below in the ThisWorkbook code module. It will not allow a
save operation if Sheet1!A1 is blank. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If Sheet1.Range("A1").Value = "" Then MsgBox "Sheet1!A1 is blank. Save operation not allowed." Cancel = True End If End Sub -- Hope that helps. Vergel Adriano "MasterChief" wrote: Does anybody have an example of VBA code that looks at certain cells when a person clicks Save or Save as and if the cell is blank it will display a message and not allow a save? Any help would be greatly appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Index/match - make blank cells return a blank value. | Excel Worksheet Functions | |||
Check for Non Blank and Blank Cells Before Save | Excel Discussion (Misc queries) | |||
Maximum Number of Blank Cells between Non Blank Cells in a Range | Excel Worksheet Functions | |||
Copy to first Blank cell in Colum C Non blank cells still exist be | Excel Programming | |||
Save As .XML, not exporting blank cells | Excel Discussion (Misc queries) |