Populate required cells prior to saving

  • Thread starter Thread starter mhart210
  • Start date Start date
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
 
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
 
Thank you for the tip, of course you have peaked my interest in the
disabling of the worksheet. Would I use deactivate for this?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top