How to prevent from saving if some cells + textbox + combobox are blank ?

francois.lemarie

Board Regular
Joined
Mar 24, 2010
Messages
54
Hello
I am preparing a template with different sheets that users will have to fill in. I use cells and 2 activeX controls (textboxes and comboboxes):

I would like the users cannot be able to save the template if the following elements are blank:
-specific cells (eg. A1 in sheet1, A2 in sheet2)
-textboxes (eg Textbox1 in sheet1, Textbox2 in sheet2)
-comboboxes (eg. Combobox1 in sheet 1, Combobox2 in sheet2)

However, these specific cells, textbox and comboboxes blank must appear in blank when they will open it. So it implies to be able to save a file with it blank ONLY IF YOU KNOW THE PASSWORD (As the creator of the template, I would be the only person to know it). If you don't know the password you have to complete cells, textboxes and comboboxes to be able to save.


I thought about a message before saving for example : "Some elements are blank, please check it all, or enter the password to save with blanks" and a little space to put the password. If the password is not the good one another message would appear : "Please put correct password or fill the blanks". I am a newbie so if you have another idea, please be free to purpose !

Would anybody be kind to tell me how to do it ? ?
Even partial answers would be appreciated.

Regards,

Francois
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi Gerald, I have duplicated threads because nobody answered and the thing was quite urgent so I wanted the thread to be more visible.

I would like to borrow the previous post when I have to create a copy of a previous thread but have absolutely no idea about how to do it. For these reason some threads are duplicated. Do you know a way to borrow its own threads?
 
Upvote 0
What do you mean by "borrow the previous post" ?
Why would you want to "create a copy of a previous thread" ?
What do you mean by "borrow its own threads" ?

The preference on this board is, if no one answers your first post (after a suitable length of time), then you can bump it, to send it back onto the first page (though maybe only for a few minutes if the board is busy!).
If you want to bump it, just reply to the original post with the word "bump".

For the record, I personally don't know how to solve your original question, but I am quite confident that it can be done. Try searching this board for things like "On Save Event".
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top