Thread: find a "." then
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Lars-Åke Aspelin[_2_] Lars-Åke Aspelin[_2_] is offline
external usenet poster
 
Posts: 913
Default find a "." then

On Sun, 3 Aug 2008 09:02:00 -0700, Rivers
wrote:

is there a way to search a variable containing "mydoc.doc" for the "." and if
found do the next line i tried

if sel=*.* then

but it doesnt work any ideas

thanks

Rivers


Try this:

Dim sel as String
If InStr(sel, ".")0 Then
' this line is executed if there is a "." in the variable sel
End If

Hope this helps / Lars-Åke