Hi again Don
I have an old problem I put aside cause I could'nt get it to work. Maybe you can
help me.
What I've got is a userform and I'm trying to have buttoms to scroll up and
down; the same as the userform in Data>Form>
Find Prev and Find Next. I'm using Spin button but could change that for regular
buttons. Here are my codes.
Jim Cone clean it up but can't get it to work. no error, just they don't do
anything. "Original post April 4"
Private Sub SpinButton1_Change()
Dim C As Range
Dim rSearch As Range
Dim strFind As String
Application.ScreenUpdating = False
Set rSearch = Range("A2:A250").Cells(Me.SpinButton1.Max - Me.SpinButton1.Value
+ 1, 1)
strFind = Me.TextBox1.Value
On Error Resume Next
Set C = rSearch.Find(strFind, LookIn:=xlValues)
On Error GoTo 0
If Not C Is Nothing Then
With Me 'load entry to form
.TextBox2.Value = C.Offset(0, 1).Value
.TextBox3.Value = C.Offset(0, 2).Value
.TextBox4.Value = C.Offset(0, 3).Value
.TextBox5.Value = C.Offset(0, 4).Value
.TextBox6.Value = C.Offset(0, 5).Value
.TextBox7.Value = C.Offset(0, 6).Value
.TextBox8.Value = C.Offset(0, 7).Value
.TextBox9.Value = C.Offset(0, 8).Value
.TextBox10.Value = C.Offset(0, 9).Value
End With
End If
Application.ScreenUpdating = True
End Sub
Regards
Cimjet
Hi Don
Thank you very much, it work's perfectly.
BTW. do you remember last year, you replied to me with this message...
"Since it is the weekend and you are old you can be forgiven for the OT which
should have been labeled as OT. I'll bet you feel much better getting that
off your chest. BTW, I am only 73 years old and do free lance Excel to keep
from "getting under foot". Much of what you say is very true."
That's me, I add to change my name Eternal-September would not accept my old
name "John"
Nice to see you still helping out and "Homework" that was a compliment (-: I
felt young again
Regards
Cimjet
Just turned 75 on income tax day. Should do it from anywhere in the
active workbook.
Sub findandcopy()
Set SS = Sheets("input sheet")
MV = SS.Cells(Rows.Count, "c").End(xlUp).Row
MS = SS.Cells(MV, "C")
With Sheets(MS)
LR = .Cells.Find("*", Cells(Rows.Count, Columns.Count) _
, , , xlByRows, xlPrevious).Row + 1
MsgBox LR
SS.Rows(MV).Copy .Cells(LR, "a")
End With
End Sub- Hide quoted text -
- Show quoted text -
Glad to help another "old man"