Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all. I got 2 sheets in the Sheet A i got a spin button and in Sheet B i
got some data. These are my 3 routines. The first make the index for the SpiBtn. The second and third are 2 events: SpinUp SpinDown. If i run the SpinUp and SpinDown macro INSIDE the code, with debugger (F8 step to step) all works grate. If i push my SpinButton, the routine is linked but dosn't produce anyeffect. Index Maker: ============================= Public Sub getposition() Dim i As Integer For i = 1 To 100 If Year(Date) = Worksheets("Mesi").Range("C" & i).Value _ And Month(Date) = Worksheets("Mesi").Range("A" & i).Value Then Foglio1.SpinButton1.Min = 1 Foglio1.SpinButton1.Value = i Foglio1.SpinButton1.Max = 100 Exit For End If Next End Sub =========================================== Events Down and Up. =========================================== Private Sub SpinButton1_SpinDown() Foglio1.SpinButton1.Value = Foglio1.SpinButton1.Value + 1 indice = Foglio1.SpinButton1.Value If indice Foglio1.SpinButton1.Max Then Exit Sub Worksheets("Main").Range("H1").Value = "CALENDARIO SCADENZE MESE DI " & _ Worksheets("Mesi").Range("B" & indice).Value & " " & _Worksheets("Mesi").Range ("C" & indice).Value End Sub ================================= Private Sub SpinButton1_SpinUp() Foglio1.SpinButton1.Value = Foglio1.SpinButton1.Value - 1 indice = Foglio1.SpinButton1.Value If indice < Foglio1.SpinButton1.Min Then Exit Sub Worksheets("Main").Range("H1").Value = "CALENDARIO SCADENZE MESE DI " & _ Worksheets("Mesi").Range("B" & indice).Value & " " &_ Worksheets("Mesi").Range("C" & indice).Value End Sub =========================================== Any Help? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 visual basic for 'spinbutton' | Excel Discussion (Misc queries) | |||
Outlook 2002 calendar dates exported to Excel 2002 sort incorrectl | Excel Worksheet Functions | |||
SpinButton control spins forever when calling COM function from Excel | Excel Programming | |||
SpinButton Controls in Excel 2000 | Excel Programming | |||
Excel 2002 files attached to Outlook 2002 EMails change size | Excel Programming |