Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Q: SpinButton = -1, linked cell = 65535

33 views
Skip to first unread message

Predrag Grkovic

unread,
Nov 28, 1998, 3:00:00 AM11/28/98
to
Hi,
when I link SpinButton to cell and try to spin below 0, I get 65535 instead
of -1 which is the Value of SpinButton control. I was looking for a place
where I could tell Excel that I want signed integer and not unsigned integer
but I couldn't find it.
Does anybody has any suggestion?
Thanks.

Lydia Gomeral

unread,
Nov 28, 1998, 3:00:00 AM11/28/98
to
Predrag,

Check the Min and Max properties for the control.
---
Lydia

Predrag Grkovic wrote in message <73p7qn$76p$1...@SOLAIR2.EUnet.yu>...

Predrag Grkovic

unread,
Nov 29, 1998, 3:00:00 AM11/29/98
to
Min = -100, Max = 100. SpinButton.Value = -1, but cell's content is 65535.


Rob Bovey

unread,
Nov 29, 1998, 3:00:00 AM11/29/98
to
Hi Pedrag,

Very interesting. I never noticed it before, but it appears as if the
spin button returns unsigned integers through its linked cell property even
though it returns signed integers through its value property.

The quickest solution to is to add an additional formula that does the
conversion for you. I'll assume that there is a named range "Link" that
represents the linked cell for the spin button and a named range "Max" that
holds the Max value for the spin button. The following formula will convert
the unsigned value into a signed value that matches the spin button's .Value
property:

=IF(Link>Max,Link-65536,Link)

--
Rob Bovey, MCSE
The Payne Consulting Group
http://www.payneconsulting.com

Predrag Grkovic wrote in message <73r2l5$dp9$1...@SOLAIR2.EUnet.yu>...

John Green

unread,
Nov 30, 1998, 3:00:00 AM11/30/98
to
Don't specify a Link Cell. Use the spinner's click event to change the cell
value. Double click the spinner, in design mode, to create the click event
procedure in the code module behind the worksheet, and add something like
the following code:

Private Sub SpinButton1_Change()
Range("D1").Value = SpinButton1.Value
End Sub

HTH,

John Green - Excel MVP
Sydney
Australia

In article <73r2l5$dp9$1...@SOLAIR2.EUnet.yu>, Predrag Grkovic wrote:
> From: "Predrag Grkovic" <pgrk...@EUnet.yu>
> Newsgroups: microsoft.public.excel.programming
> Subject: Re: SpinButton = -1, linked cell = 65535
> Date: Sun, 29 Nov 1998 10:03:36 +0100

0 new messages