It would be more helpful to know what the value of colF is on entry. It has
to be less than 1 or the loop will be skipped. But you are using it as the
second parameter for a call to Cells(). This must be a column number so it
must be an integer, 1 or greater. But we can only get there is colF is less
than one.
Then there is a zero, all on its own. Don't know what that is doing.
Then colF is increased by 1 so it is not going through the loop again unless
it started as a negative.
It would really be better to paste the whole sub (if it is not too long) so
that we can see the Dim statements for the variables, etc.
Best Regards
David Grugeon
Excel VBA Group Moderator
-----Original Message-----
From: ExcelVBA@yahoogroups.com [mailto:ExcelVBA@yahoogroups.com] On Behalf
Of HawtSweetie240
Sent: Wednesday, 19 September 2012 8:05 AM
To: ExcelVBA@yahoogroups.com
Subject: [ExcelVBA] help with "If IsError .. "
Could some one please help me find the issue that is causing error in the
part of the code below? I am basically getting error is the If IsError part
of the code
Do While colF < 1
If IsError(WorksheetFunction.Search("Multiple", wkShtF.Cells(1, colF), 1))
Then
0
colF = colF + 1
Else
multiple = WorksheetFunction.Search("Multiple", wkShtF.Cells(1, colF), 1)
colF = colF + 1 End If Loop
Thank you in advance
------------------------------------
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go
here: http://www.mousetrax.com/techtrax to enter the ezine, then search the
ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------Yahoo! Groups Links
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Tidak ada komentar:
Posting Komentar