Exract Characters From String

Discussion in 'SolidWorks' started by inthepickle, May 2, 2006.

  1. inthepickle

    inthepickle Guest

    Hopefully a very simple question requiring a very simple answer.

    I have the part number stored as a string

    FileName = "123456-01"

    How do I extract the first 4 characters from this variable and place
    them in another variable.

    I tried using InStr but I could not figure out how to get it to work.

    Can anyone help me?
     
    inthepickle, May 2, 2006
    #1
  2. inthepickle

    That70sTick Guest

    auf VB...

    NewString = Left (FileName,4)
     
    That70sTick, May 2, 2006
    #2
  3. inthepickle

    inthepickle Guest

    got it - thanks anyways

    Left$(FileName, 4)
     
    inthepickle, May 2, 2006
    #3
  4. inthepickle

    inthepickle Guest

    got it - thanks anyways

    Left$(FileName, 4)
     
    inthepickle, May 2, 2006
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.