Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Spin Control

I have placed a spin button on a chart. I am unable to
capture/define what I want the spin control to perform for
up/down. I can only assign a macro to the control. It's
acting like a button and not a spin control.

How do I capture whether the control was pressed up or
down?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Spin Control

Hi,



If you make your spin control with the control toolbox, you then have, in
the module of that sheet, the possibility to add code for this control, like
that:



Private Sub SpinButton1_Change()

Range("a1").Value = SpinButton1.Value

End Sub


--
JP

http://www.solutionsvba.com


"John C" wrote in message
...
I have placed a spin button on a chart. I am unable to
capture/define what I want the spin control to perform for
up/down. I can only assign a macro to the control. It's
acting like a button and not a spin control.

How do I capture whether the control was pressed up or
down?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Spin Control

look at the value of the control in your code and see if it has increased or
decreased. You may need to use a static variable to store the value each
time as you exit the sub, then when the sub starts again, compare the value
of the control to the static variable to see if it has increased or
decreased.

--
Regards,
Tom Ogilvy


John C wrote in message
...
I have placed a spin button on a chart. I am unable to
capture/define what I want the spin control to perform for
up/down. I can only assign a macro to the control. It's
acting like a button and not a spin control.

How do I capture whether the control was pressed up or
down?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Spin Control

I am not able to use the Control Toolbox to create the
spin control, only the Forms Toolbar allows the spin
control to be formed.

I understand what you refer to for the module sheet should
show the control and associated properties, but creating
it from the Forms Toolbar does not present this
information.

Any other ideas?


-----Original Message-----
Hi,



If you make your spin control with the control toolbox,

you then have, in
the module of that sheet, the possibility to add code for

this control, like
that:



Private Sub SpinButton1_Change()

Range("a1").Value = SpinButton1.Value

End Sub


--
JP

http://www.solutionsvba.com


"John C" wrote in message
...
I have placed a spin button on a chart. I am unable to
capture/define what I want the spin control to perform

for
up/down. I can only assign a macro to the control.

It's
acting like a button and not a spin control.

How do I capture whether the control was pressed up or
down?



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Spin Control

Hi,



Then, one possibility could be, you right click your spin control, when
selected, and with the "Format Control" link it to a cell on another sheet.
With the macro assign to the spin control read the value of that cell do
what you like according to the value.



Hope it's help.


--
JP

http://www.solutionsvba.com


"John C." wrote in message
...
I am not able to use the Control Toolbox to create the
spin control, only the Forms Toolbar allows the spin
control to be formed.

I understand what you refer to for the module sheet should
show the control and associated properties, but creating
it from the Forms Toolbar does not present this
information.

Any other ideas?


-----Original Message-----
Hi,



If you make your spin control with the control toolbox,

you then have, in
the module of that sheet, the possibility to add code for

this control, like
that:



Private Sub SpinButton1_Change()

Range("a1").Value = SpinButton1.Value

End Sub


--
JP

http://www.solutionsvba.com


"John C" wrote in message
...
I have placed a spin button on a chart. I am unable to
capture/define what I want the spin control to perform

for
up/down. I can only assign a macro to the control.

It's
acting like a button and not a spin control.

How do I capture whether the control was pressed up or
down?



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Cell Link on Spin Button Form Control Adam Ronalds Excel Discussion (Misc queries) 14 August 27th 09 05:52 PM
Excel spin box - no Control tab in Format Control dialong box tocoau Excel Worksheet Functions 7 August 10th 08 03:15 PM
spin boxes Pé Excel Worksheet Functions 1 October 14th 06 10:03 PM
spin button value tina Excel Discussion (Misc queries) 2 March 17th 05 02:11 PM
Spin Button Andrew[_14_] Excel Programming 1 July 18th 03 01:51 AM


All times are GMT +1. The time now is 07:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"