Results 1 to 3 of 3

Thread: Right() [RESOLVED]

  1. #1

    Thread Starter
    Addicted Member GSIV's Avatar
    Join Date
    Jun 2002
    Location
    Texas, USA
    Posts
    213

    Question Right() [RESOLVED]

    I'm getting an error with this code that states the Right command is looking for an integer. What am I doing wrong?

    Code:
            Dim strPath As String = Application.StartupPath
            If Right(strPath, 1) <> "\" Then
                strPath = strPath & "\"
            End If
    Last edited by GSIV; Dec 17th, 2003 at 03:25 PM.

  2. #2
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    Right() is a vb6 function , try this ... ( which works fine )
    VB Code:
    1. Dim strPath As String = Application.StartupPath
    2.         If Not strPath.EndsWith("\") Then
    3.             strPath += "\"
    4.             MessageBox.Show(strPath)
    5.         End If
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  3. #3

    Thread Starter
    Addicted Member GSIV's Avatar
    Join Date
    Jun 2002
    Location
    Texas, USA
    Posts
    213
    Cool... thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width