Backslash concatination problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marina

    #1

    Backslash concatination problem

    Hi,

    I'm trying to concat: "\" & variable, where variable is some string,
    but VB is making it to be "\\variable ".
    for example if variable is "Test", vb is making it to be "\\Test"
    instead of "\Test".

    I've tried almost everything.
    Does anyone has an idea.

    Thanks a lot, Marina
    marina@nogacom. com

  • Branco Medeiros

    #2
    Re: Backslash concatination problem

    Marina wrote:
    I'm trying to concat: "\" & variable, where variable is some string,
    but VB is making it to be "\\variable ".
    for example if variable is "Test", vb is making it to be "\\Test"
    instead of "\Test".
    >
    I've tried almost everything.
    Does anyone has an idea.
    <snip>

    I personaly never saw such behavior. Couldn't it be the the variable
    was already "\Test", to begin with? Please, post some code.

    Regards,

    Branco.

    Comment

    • Tiago Salgado

      #3
      Re: Backslash concatination problem

      I've write this code and the result is correct.

      Dim str As String = "Test"
      str = "\" & str
      Debug.Print(str )

      It returns "\Test"

      Post your code here, because is there some error wich is putting your return
      value wrong.

      --

      Tiago Salgado



      Website da comunidade Portugal-a-Programar, a comunidade portuguesa de programação. Fórum de discussão de temas relacionados com programação e informática em geral, Portal de Downloads, Blogs, Wiki e Revista Programar.

      Portal da Revista PROGRAMAR, a revista portuguesa de programação


      "Marina" <MarinaGre@gmai l.comwrote in message
      news:1171374688 .372320.15520@q 2g2000cwa.googl egroups.com...
      Hi,
      >
      I'm trying to concat: "\" & variable, where variable is some string,
      but VB is making it to be "\\variable ".
      for example if variable is "Test", vb is making it to be "\\Test"
      instead of "\Test".
      >
      I've tried almost everything.
      Does anyone has an idea.
      >
      Thanks a lot, Marina
      marina@nogacom. com
      >
      >

      Comment

      • Larry Linson

        #4
        Re: Backslash concatination problem

        is not \ a simple escape character?

        give more detail about your exact code, sweetheart




        On Feb 13, 5:51 am, "Marina" <Marina...@gmai l.comwrote:
        Hi,
        >
        I'm trying to concat: "\" & variable, where variable is some string,
        but VB is making it to be "\\variable ".
        for example if variable is "Test", vb is making it to be "\\Test"
        instead of "\Test".
        >
        I've tried almost everything.
        Does anyone has an idea.
        >
        Thanks a lot, Marina
        mar...@nogacom. com

        Comment

        Working...