Hi,
is this code commented:
'Cells.Find(What:="Product", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
_
MatchCase:=False, SearchFormat:=False).Activate
Normally you get that message from the
VB Compiler when it comes to a Stop
statement in the code.
so look for that somewhere in your
VB Project ...
HTH
Philip
"Stuart C" wrote:
Hi,
Do you know why I'd be receiving this error when running an excel
macro? It occurs at End sub.
This is my code:
Sub OpenInpSpread()
Dim varFileName As String
varFileName = Sheets("DataInput").Range("B3").Value
Workbooks.Open Sheets("DataInput").Range("B3").Value
'Cells.Find(What:="Product", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
_
MatchCase:=False, SearchFormat:=False).Activate
End Sub
Thankyou,
Stuart.
--
Stuart C
------------------------------------------------------------------------
Stuart C's Profile: http://www.excelforum.com/member.php...o&userid=32706
View this thread: http://www.excelforum.com/showthread...hreadid=525323