R
Rick S.
In the code below I am not able to pass the variable "sFindMe" with out an
error, typical "object variable or with block variable not set"
If I serach for string ".0625" it crashes, if I search for string "1" it
runs through all sheets fine?
What am I doing wrong besides programming in VBA?
I just realized the code wont stop at each instance for me to view LOL
================================
Sub CommandButton3_Click()
Dim ws As Worksheet
Dim sFindMe As String
sFindMe = TextBox1.Value
For Each ws In ActiveWorkbook.Worksheets
ws.Select
Cells.Find(What:=sFindMe, After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
, SearchFormat:=False).Activate
Next
End Sub
====================================
--
Regards
Rick
XP Pro
Office 2007
error, typical "object variable or with block variable not set"
If I serach for string ".0625" it crashes, if I search for string "1" it
runs through all sheets fine?
What am I doing wrong besides programming in VBA?
I just realized the code wont stop at each instance for me to view LOL
================================
Sub CommandButton3_Click()
Dim ws As Worksheet
Dim sFindMe As String
sFindMe = TextBox1.Value
For Each ws In ActiveWorkbook.Worksheets
ws.Select
Cells.Find(What:=sFindMe, After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
, SearchFormat:=False).Activate
Next
End Sub
====================================
--
Regards
Rick
XP Pro
Office 2007