Ask Your Question
0

how do I require user input into a cell in Calc

asked 2019-10-17 17:58:35 +0100

mcguirep61 gravatar image

I have a spreadsheet this is basically an invoice. I need to make sure the user enters a persons phone number into a cell. Currently I have the word 'Required' in the field. However, 'some users' don't understand they actually HAVE to enter a phone number into this cell. How can I make sure the user actually enters something into this field before saving / printing the sheet?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-10-18 17:49:12 +0100

Lupp gravatar image

updated 2019-10-18 17:49:59 +0100

As far as I know there is no readymade tool to accomplish what you intend.
You can define mandatory fields, however, for database records ...
Actually I would suggest to use a database for business purposes of the kind anyway.

To get Calc do it as you want you will need some somersaults.
-1- Remove all the icons/menu_items for printing and saving from menus and toolbars with the document (template) as the scope.
-2- Insert pushbuttons for printing and saving into your sheet and assign respective Sub to their action events.
-3- Assign a Sub looking for the contents of the mandatory fields (cells now) to the sheet event 'Content changed'.
-4- You may use a global variable keepimg a Boolean result meaning "All mandatory entries present"...
-5- Use the result of the processes described under 3, 4 to set the pushbuttons enabled/disabled as needed.

I tried it in a playful way (and not at all foolproof), and would assume you need hours (not too few) to accomplish the task - and weeks of learning if you not are already trained in programmimg for LibreOffice.

edit flag offensive delete link more

Comments

Thank you for the reply! Not what I was hoping for, but expected.

mcguirep61 gravatar imagemcguirep61 ( 2019-10-22 17:40:00 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-10-17 17:58:35 +0100

Seen: 46 times

Last updated: Oct 18