Consulting

Results 1 to 2 of 2

Thread: Inserting default character(s) when submit button is pressed

  1. #1

    Exclamation Inserting default character(s) when submit button is pressed

    Hi there,

    I am new to this forum and relatively new to VBA, but I was wondering if anyone is able to help me it is kind of urgent but would really appreciate a reply.

    What I am trying to do is, create a form input field on a user form.

    The user wants to add in text say like a printer model number: MFC1100.

    But the cell already has a value inserted into it: Brother

    But as the user clicks submit on the form, the macro automatically inserts: /// before the MFC1100.

    So the outcome after the userform has been used is Brother///MFC1100 and can then add in more like Brother///MFC1100/MFC1200 etc...

    Could this be possible?

    Thanks,
    Jeremy.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    With Range("A1")

    .Value = .Value & "///" & TextBox1.Text
    End With
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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