On Fri, 23 May 2008 11:28:12 +0300 "Dotan Cohen" <[EMAIL PROTECTED]> wrote:
> I have a calc sheet with a cell who's natural-number content must be
> incremented ++1 several times a day. Instead of retyping the new
> number over the old number, I would like to create a 'button' that
> increments the value by 1. I'm thinking that a clever if condition
> might help, but I'm not getting very far doing this alone. Pseudo
> JS-style code would look something like onmouseclick(++cell.value)
> however I cannot find anything like onmouseclick for Calc if
> conditions.
Here is a macro that I hard coded to increment a value in cell D2. I
must admit that I found something similar online, but I need to start
to learn OO.o macro languages in the next few weeks.
Sub Incd2()
mynum = Range("d2") + 1
Range("d2") = mynum
End Sub
--
Jerry Feldman <[EMAIL PROTECTED]>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB CA3B 4607 4319 537C 5846
signature.asc
Description: PGP signature
