Hello Board,
The procedure below has always worked, basically just to save a few keystrokes, and present cleaner code. I I tried to expand it today to start the search from the current location. I just added an optional 2nd parameter (bottom bloc) but I get a very vague "Expected =" error. Can someone help me resolve this? Thanks.
/*
'----------------------------------------------------------------------------
Sub Find_Text(cString)
'
' Find_Text Macro
' Macro recorded 9/11/2006
'
Application.ScreenUpdating = 0
Range("A1").Select
Cells.Find(What:=cString, After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate
End Sub
'----------------------------------------------------------------------------
*/
/*
'----------------------------------------------------------------------------
Sub Find_Text(cString, Optional cBegin As String)
'
' Find_Text Macro
' Macro recorded 9/11/2006
'
If cBegin Is Null Then cBegin= "A1"
Application.ScreenUpdating = 0
Range(cBegin).Select
Cells.Find(What:=cString, After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate
End Sub
'----------------------------------------------------------------------------
*/
The procedure below has always worked, basically just to save a few keystrokes, and present cleaner code. I I tried to expand it today to start the search from the current location. I just added an optional 2nd parameter (bottom bloc) but I get a very vague "Expected =" error. Can someone help me resolve this? Thanks.
/*
'----------------------------------------------------------------------------
Sub Find_Text(cString)
'
' Find_Text Macro
' Macro recorded 9/11/2006
'
Application.ScreenUpdating = 0
Range("A1").Select
Cells.Find(What:=cString, After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate
End Sub
'----------------------------------------------------------------------------
*/
/*
'----------------------------------------------------------------------------
Sub Find_Text(cString, Optional cBegin As String)
'
' Find_Text Macro
' Macro recorded 9/11/2006
'
If cBegin Is Null Then cBegin= "A1"
Application.ScreenUpdating = 0
Range(cBegin).Select
Cells.Find(What:=cString, After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate
End Sub
'----------------------------------------------------------------------------
*/