View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Robert[_33_] Robert[_33_] is offline
external usenet poster
 
Posts: 26
Default Scrollbar with variable maximum and minimum

I would like to create a scrollbar which is linked tocells holding the
edge conditions (max & min). I did find some topics regarding this
subject, but none described exactly the problem I am experiencing.

I am new to writing VBcode but eager to learn. So far I came up with
the following code:

Private Sub ScrollBar1_Change()

Dim Top As Integer
Dim Dal As Integer

Top = Cells(3, "A").Value
Dal = Cells(2, "A").Value

With ScrollBar1
Dim Rng As Range
.Max = Top
.Min = Dal

Range("D1").Value = ScrollBar1.Value
End Sub

Is there anyone which is higher skilled in VBA as I am not (yet). What
am I missing.