N
newsbin.telenet.be
I am familiar with VBA in Access but not in XL.
I am looking for code (On Change event from a Spinbutton) which searches in
a range of cells (called "Schoolyear") the value which stays in cell B10.
If found the value of the cell should change to the value from B10
I started with the code from the Help file but I cannot adapt it.
With Worksheets(1).Range("a1:a500")
Set c = .Find(2, lookin:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Value = 5
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
end withShould I declare variables and objects?
tks for helping
Michel
I am looking for code (On Change event from a Spinbutton) which searches in
a range of cells (called "Schoolyear") the value which stays in cell B10.
If found the value of the cell should change to the value from B10
I started with the code from the Help file but I cannot adapt it.
With Worksheets(1).Range("a1:a500")
Set c = .Find(2, lookin:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Value = 5
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
end withShould I declare variables and objects?
tks for helping
Michel