User form and concatenated values

Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: User form and concatenated values

  1. #1
    Board Regular marcusforce's Avatar
    Join Date
    May 2004
    Location
    Stockholm
    Posts
    52
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default User form and concatenated values

     
    Hi,

    I'm working on a user form where the user is picking a text choice in a combobox(1).
    When this is done a counter adds 1 to the variable counterl.

    This is where I got a bit stuck:
    I want to set a new variable where counterv= combobox1.value AND counterl.value
    Then I want to show the counterl value in textbox1.
    Help with this bit of coding much appreciated.

  2. #2
    Board Regular
    Join Date
    Jun 2002
    Posts
    84
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: User form and concatenated values

    Hi,

    im not too hot on forms,

    but can you now just use code

    counterv = combobox1.value & counterl.value

    then textbox1.value = counterv

    let me know if this works?!!
    thanks

  3. #3
    Board Regular marcusforce's Avatar
    Join Date
    May 2004
    Location
    Stockholm
    Posts
    52
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Nope, that seems like the most intuitive solution, but that concatenation doesn't work.

  4. #4
    Board Regular
    Join Date
    Jun 2002
    Posts
    84
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: User form and concatenated values

    this code works when not in a userform :-

    cxan you try replacing "hello" and "hello2" with your counterl.value and combobox1.value ??

    by assigning them to variables rather than not trying to concatenate them directly???

    have a go

    Sub trst()

    counter = "hello"
    counter2 = "hello2"

    counter3 = counter & counter2

    MsgBox (counter3)


    End Sub

  5. #5
    Board Regular marcusforce's Avatar
    Join Date
    May 2004
    Location
    Stockholm
    Posts
    52
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    That was a good piece of advice, works now, thanks!

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com