LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Simple Object-Type Q

Hi again, thanks for looking. In the following code snippet, I am looking
through a sheet for matching entries. If no match is found, I want to delete
some output that's already been placed and jump ahead a few entries in the
for each loop. I tried to do this by just redefining player, the variable
in the for each loop, as a cell a few cells below where it used to be, but I
get an object type mismatch error. How can I accomplish the goal of just
skipping a few values of player here?

For Each player In ws1.Range("B2:B" & lr1)

Set c = ws2.Range("A2:A" & lr2).Find(What:=player, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
MatchCase:=False)

If c Is Nothing Then
ws3.Cells(x, lc3 + 4).EntireRow.Delete
ws1.Cells(x, 26).Value = "DATA CORRUPTED"
'LINE OF INTEREST IS BELOW, GETTING OBJECT TYPE MISMATCH HERE
player = ws1.Cells(player - y + 7, 2)

y = 1
Set c = ws2.Range("A2:A" & lr2).Find(What:=player, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
MatchCase:=False)
End If
code continues on for the case where there is a match


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
probably simple - type mimatch error 13 PBcorn Excel Programming 5 October 29th 08 03:46 PM
problem:Structure with Object reference (TYPE...END TYPE) syswizard Excel Programming 6 February 16th 07 10:00 PM
object on RHS when there is a type-mismatch [email protected] Excel Programming 0 October 12th 06 02:00 AM
simple: type mismatch mark kubicki Excel Programming 1 February 21st 06 07:01 PM
On-the-fly determination of object type? Ed Excel Programming 2 May 17th 05 08:37 PM


All times are GMT +1. The time now is 11:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"