Populate required cells prior to saving

M

mhart210

I need help with a form to be used by many people. There are severa
fields that I would like to have populated with text, date, phon
number, etc. before the user can save the form. Is there any way t
force someone to enter a field prior to saving the worksheet
 
G

Gord Dibben

You can have Before_Save code in ThisWorkbook module that won't let the user
save/close the workbook.

The efficacy of this hinges upon the user enabling macros when opening the
workbook.

Of course, you have to make the workbook unusable if users decide to disable
macros.

That is another set of code.


Gord Dibben MS Excel MVP


Gord Dibben MS Excel MVP
 
M

mhart210

Thank you for the tip, of course you have peaked my interest in the
disabling of the worksheet. Would I use deactivate for this?
 
G

Gord Dibben

You add a sheet to the workbook with a message "If you have disabled macros,
this workbook is useless" or similarly frightening.

In Before_Close sub you xlveryhidden all the sheets but that one.

If users open the workbook with macros disabled, this is all they will see.

If macros are enabled, your Workbook_Open code will unhide the other sheets and
hide the message sheet and your Before_Save code will be enabled also.


Gord
 
Top