How do I format a button to increment up or down by 1?

Discuss the spreadsheet application
Post Reply
mikedunbar
Posts: 2
Joined: Tue Mar 24, 2009 4:57 pm

How do I format a button to increment up or down by 1?

Post by mikedunbar »

Hello-
I hope this isn't too stupid. I'm trying to make an order sheet for a diner. I want there to be a button that you can push (on a handheld pda) inside the spreadsheet which will increment and then output a number by 1. I found the way to put a button in, but I can't get it do do anything when I preview it, or preview it in a browser. I hope someone can help.
thanks in advance, Mikedunbar.
OOo 2.3.X on Ms Windows XP
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: How do I format a button to increment up or down by 1?

Post by acknak »

You can configure a "spin button" control to increment (or decrement) a cell value, using nothing other than the standard Calc menus and settings, but you can't make a plain button that does that without using a bit of macro programming. The button would be linked to your little program, so that when you click on the button, your code is called, which then updates some particular cell's value.

Here's a sample spin button:
Attachments
spin_button.ods
(7.31 KiB) Downloaded 528 times
AOO4/LO5 • Linux • Fedora 23
mikedunbar
Posts: 2
Joined: Tue Mar 24, 2009 4:57 pm

Re: How do I format a button to increment up or down by 1?

Post by mikedunbar »

that's exactly the ticket. Thank you very much. :D
OOo 2.3.X on Ms Windows XP
User avatar
TheGurkha
Volunteer
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: How do I format a button to increment up or down by 1?

Post by TheGurkha »

If this has answered your question please go to your first post and use the Edit button, and add [Solved] to the start of the title. You can use the green tick icon at the same time if you like.
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
Post Reply