Thread: R/T 438
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default R/T 438

Omit WorksheetFunction! VBA has its own LEFT function!

Regards,
Stefi


€˛Jim May€¯ ezt Ć*rta:

The below code is bombing on line:
v = Application.WorksheetFunction.Left(v, Len(v) - 1)

Not sure if the later two lines will work or not

Sub tester()
Dim v As String
Dim Rng As Range
Set Rng = Range("A2:A16")
For Each cell In Rng
If cell.Value = "9/15/2006" Then
v = v + cell.Address & ","
End If
Next
'need to remove the last "," assigned to my v next
v = Application.WorksheetFunction.Left(v, Len(v) - 1)
Set Rng1 = Range(v)
Rng1.Entirerow.select
End Sub

Any help appreciated.