LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 189
Default problem in VB codes

hi,
can anybody tell me why when I put a loop for the following code, it doesn't
work!there's an error like:"unable to get the find property of the
worksheetfunction class"????!!!!!

Private Sub CommandButton4_Click()
Dim VAR As Variant
'For I = 13 To 32
VAR = Application.WorksheetFunction.Find("/164", Cells(13, 2))
If VAR = 1 Then
Cells(13, 2) = Application.WorksheetFunction.Substitute(Cells(13, 2),
"/164", "")
End If
End Sub

the above codes work but the loop below NO?

Private Sub CommandButton4_Click()
Dim VAR As Variant
For I = 13 To 32
VAR = Application.WorksheetFunction.Find("/164", Cells(I, 2))
If VAR = 1 Then
Cells(I, 2) = Application.WorksheetFunction.Substitute(Cells(I, 2), "/164",
"")
Else
End If
Next
End Sub
thanx,
 
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
Help with codes Tom Excel Discussion (Misc queries) 4 September 18th 07 01:50 AM
Help with codes please!! Nick TKA Excel Discussion (Misc queries) 0 April 28th 06 12:47 PM
Bar Codes [email protected] Excel Discussion (Misc queries) 4 August 31st 05 08:12 AM
VBA Codes smck Excel Worksheet Functions 2 May 11th 05 10:03 AM
Zip Codes [email protected] Excel Discussion (Misc queries) 10 November 27th 04 05:23 PM


All times are GMT +1. The time now is 02:09 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"