Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have found some code from another thread which stops users leaving cells blank and displays a warning message when the user attempts to save the file: Dim cell As Range For Each cell In Sheets("Sheet2").Range("A1,A2,A3,A4") If IsEmpty(cell.Value) Then MsgBox "You must fill in cell " & cell.Address Application.Goto cell Cancel = True Exit For End If Next cell Now, this works fine in the file itself and when I save it as a .xlsm file (I am using Excel 2007). However, the problem is that when you go to open the file the macro is intially disabled, as explained by the Information Bar. For the macro to work, it has to be activated by the user. So, if a user choose not to activate the code, then they can just leave the cells blank. Is there a way round this to force the macro to work? Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Leaving a total sum cell blank until other cells are filled | Excel Worksheet Functions | |||
Adding cells but leaving blank if not populated | Excel Worksheet Functions | |||
Stop users pasting data in cells | Excel Discussion (Misc queries) | |||
Colouring Ranges & Leaving Cells Blank | Excel Discussion (Misc queries) | |||
MACRO - Unmerge cells and delete blank columns, leaving data colum | Excel Programming |