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: 345
Default VB and Find worksheet function

am new to VB, but have progrmmed before. could not find 'find' in vb and
tried to use
worksheet function following examples in VB help.
am trying to get one cell to work before I attack b1:bnnn range.
each row in the worksheet one stop on a delivery route.
there will be one more test on same row, column D, if delcode is valid.
got run time error 1004.
'unable to get find property of the worksheet function class'

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim position As Integer
Dim delcode, validcodetable As String

validcodetable = " 3 4 5 s/s SO <<"
msg1 = "Fix delivery code; blank, 3, 4, 5, s/s, SO, < are OK."
delcode = Trim(Range("b5"))

' this next statement is getting the error
position = Application.WorksheetFunction.Find(delcode, validcodetable, 1)
If position < 1 Then MsgBox msg1, , "Column B"

End Sub

this is all the code, don't know how to proceed.
Thanks.
Neal Z
--
Neal Z
 
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
Find text - worksheet function or macro? sebh007 Excel Discussion (Misc queries) 6 January 8th 07 12:53 AM
Find last non-blank row with a worksheet function Bruce Excel Worksheet Functions 2 November 25th 05 05:10 AM
Worksheet Function - Find? DAA Excel Worksheet Functions 2 February 24th 05 04:15 PM
for stats worksheet in XL how do i find the minitab function freethrow18 Excel Worksheet Functions 1 February 2nd 05 05:38 AM
Using Worksheet Function Find in VBA bcmiller[_2_] Excel Programming 4 May 21st 04 09:48 AM


All times are GMT +1. The time now is 10:05 AM.

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"