ScrollBar is still activated when pressed > 2 times in a row

0

0000_AAAA_0000

I have a Scroll Bar:

Private Sub ScrollBar1_Change()
With ScrollBar1
.Min = 1
.Max = 30
.LargeChange = 5
.SmallChange = 1
End With
Range("A1").Select
End Sub


My problem comes because only once every to times I am eble t
accompliss this:
Range("A1").Select
Usually if I press the ScrollBar when Range("A1") is activated non
cell becomes activated the next time, the ScrollBar is activated.
and
if Range("A1") in this case is not selected the ScrollBar become
activated.

How can Avoid this and select Range("A1") every time????


Many thanks in advance!
 
K

keepITcool

I've seen this happen before with a Spinner from the "controls Toolbox"
(embedded control) ... so i presume/assume your's is an embedded control
too.

it takes focus intermittently...
and NO way you keep your cell selection.

I solved it by exchanging it for a "native" scrollbar
from "Forms" toolbar.



keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >
 
V

Vic Eldridge

Your code appears to work fine if you put it in the Scrollbar's
GotFocus event.

Private Sub ScrollBar1_GotFocus()
With ScrollBar1
.Min = 1
.Max = 30
.LargeChange = 5
.SmallChange = 1
End With
Range("A1").Select
Range("A1") = ScrollBar1.Value
End Sub


Regards,
Vic Eldridge
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top