View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
funkymonkUK[_146_] funkymonkUK[_146_] is offline
external usenet poster
 
Posts: 1
Default searching through a string?


I have the following.

Sub test1()
' Find what the users shared drive is named
Dim mainpath As String
Dim lenPath As Integer
Dim outstring As String
mainpath = ThisWorkbook.FullName
lenPath = Len(mainpath) - 17

outstring = Mid(mainpath, WorksheetFunction.Find("_", mainpath) + 1,
WorksheetFunction.Find _
(" ", mainpath, WorksheetFunction.Find("_", mainpath)) -
WorksheetFunction.Find("_", mainpath) - 1)

mainpath = ""
lenPath = Blank
End Sub

I have run this and get the following error message "1004. Unable to
get the find property of the worksheetfuntion class" any ideas?


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=538371