Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error in code

Status
Not open for further replies.

fizz83

Programmer
Joined
Jul 13, 2004
Messages
1
Location
GB
would anyone be able to tell me why using:
If oWorksheetExisting.Range("A11:A28") generates a type mismatch, is there a better way to test if the cell is in a specific range without using a second for loop?
thanks


For Each Cell In oWorksheetExisting.Range("A6:M30")

If Cell = "" Then
End If

If oWorksheetExisting.Range("A11:A28") Then
Stng = Cell
oWorksheet.Cells(CellCount, 1).Value = Stng
End If

Next Cell
 
if union(rng1, rng2).address =rng2.address then
InRange = True
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top