View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
RAP RAP is offline
external usenet poster
 
Posts: 49
Default Apply LEN result to string?

Edward,
Thank you for your time and input. I already have a solution worked out in
VB code, and can even get the answer to display in a msgbox, like the
solution you presented. When I re-read my post, I see where I left out a lot
of info in an effort to be short & sweet. Too much cropping this time. My
apologies.

I simply cannot get the syntax correct to get the worksheet function LEFT to
accept variables instead of hard-coded text and numbers. Please see my reply
to Bob for detail ad-nauseum on what I am attempting to do. Thanks again for
your input.
-Randy



"Edward Ulle" wrote:

Try this

Option Explicit

Sub Test()

Dim strFullFileName As String
Dim i As Integer

strFullFileName = "FileXX.dat"
i = InStr(strFullFileName, ".") - 1

MsgBox Left(strFullFileName, i)

End Sub



*** Sent via Developersdex http://www.developersdex.com ***