+ Reply to Thread
Results 1 to 8 of 8

Userform

  1. #1
    Registered User
    Join Date
    12-26-2008
    Location
    Singapore
    Posts
    18

    Userform

    I am a very beginner in VBA Excel 2007

    I have a textbox named textbox1, How should i write my command button code so that my textbox will display below message when button was clicked

    Updates.
    1 Dec Monday 10am @ abc swimming complex
    Alibaba 12345678 Paid100.
    Please arrange first lesson meet up with student.
    -Microsoft

    Thank you in advance
    Last edited by mudraker; 12-27-2008 at 08:27 PM. Reason: Marking thread Solved

  2. #2
    Registered User
    Join Date
    12-22-2008
    Location
    Vietnam
    Posts
    11
    You please upload your sample file, we will do it for you

  3. #3
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Assuming the button is on the same form as textbox1

    The _ at the end of each line indicated the command is continued on the next line

    VBLF is a carrage return or instead of VBLF you could use Chr(10)

    You will also need to ensure Multiline property for Textbox1 is set to True

    Please Login or Register  to view this content.

    P.S
    Welcome to Excelforum

    Please ensure you read the Forum Rules

    Your thread broke Rule 5
    Excel Programming was the best forum to post this question in
    Last edited by mudraker; 12-27-2008 at 12:08 AM.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  4. #4
    Registered User
    Join Date
    12-26-2008
    Location
    Singapore
    Posts
    18
    Sorry for post to wrong section. Can you let me know which section i should post?

    And thank you for your reply. It's work.

    Can i add a button on my excel sheet so that when i need to use the userform, it will appear?

  5. #5
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    I only have Excel 2003 so the steps might be slightly different in 2007

    In 2003 you have a choice of 2 buttons

    Button 1 option
    ControlToolbox Toolbar
    Command Button
    Draw button on sheet
    Right click on button
    View Code
    Add following code to displayed Sub procedure - Change UserForm1 to the name of your form
    Please Login or Register  to view this content.


    Button Option 2
    Forms Toolbar
    Button
    Draw button on sheet
    Right click on button
    Assign Macro
    New
    Add following code to displayed Sub procedure - Change UserForm1 to the name of your form

    Please Login or Register  to view this content.

    From my previous reply
    Excel Programming was the best forum to post this question in
    Last edited by mudraker; 12-27-2008 at 04:08 AM.

  6. #6
    Registered User
    Join Date
    12-26-2008
    Location
    Singapore
    Posts
    18
    Yes, the problem is solved and i learned a lots.

    Thank again ^_^

  7. #7
    Registered User
    Join Date
    12-26-2008
    Location
    Singapore
    Posts
    18
    How to mark the thread is solved?

  8. #8
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    To mark your thread Solved
    You need to Edit your initial thread posting

    In the smaller Title window which displays (no prefix) Select the Solved option from the drop down list
    Save Changes

    I have marked your Thread Solved for you

    Glad to have aided you learning a bit more about Excel

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1