SpinButton Change Selection
Hi Toppers,
Sorry, I forgot to mention that I'm using a Spinbutton
from the Toolbox. The Spinbutton is directly located on a
Worksheet and not on a UserForm.
The Values are correct - I know. But in fact I don't need
them. It was just a test. I would like the cursor to
switch to the next cell. If the Spinbutton is arranged on
a Worksheet the behavior is very strange.
Best regards,
Marlon
-----Original Message-----
Marllon,
Unless I misunderstand what you are
trying to do, it looks OK
to me in that it puts 1 in A1, 2 in A2 , .. 10 in A10
with the Spinbutton on
a Userform.. And it does this in either direction.
Equally, if I change the
column, the value is put in the required cell.
[MS office 2003]
"Marlon" wrote:
Hi,
I would like to create a SpinButton with which I
change
from one cell to the next one (up and down).
I tried this:
Private Sub SpinButton1_Change()
With SpinButton1
.Min = 1
.Max = 10
Cells(.Value, 1).Select
Cells(.Value, 1) = .Value
End With
End Sub
The problem is that the "Cells(.Value, 1).Select"
doesn't
work properly. But the values in the cells are like
expected "Cells(.Value, 1) = .Value". If you use the
code
above you can see what I mean.
Many thanks for help.
Best regards,
Marlon
.
|