+ Reply to Thread
Results 1 to 4 of 4

Using Custom Forms to add a mutil-line text box that enters data into a spreadsheet

  1. #1
    Registered User
    Join Date
    03-02-2010
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    8

    Using Custom Forms to add a mutil-line text box that enters data into a spreadsheet

    I am new to VBA. I am trying to create a user-form comprised of six text boxes and an OK and Cancel Command Button. I want the user-form to popup on a specific sheet "FA" when an existing button is clicked (this button clears other areas of data) in the spread sheet and the user to fill in the requested data. The spread sheet generates a form, so I need the data from the user form to go into specific cells in the spread sheet. I will post the code I have below, not much so far.

    Private SubUserForm_Click()

    Sheets("FA").Range("A2").Value = DocumentTitle.Text
    Sheets("FA").Range("A3").Value = AccountName1.Text
    Sheets("FA").Range("A4").Value = AccountName2.Text
    Sheets("FA").Range("A5").Value = ReviewerName.Text
    Sheets("FA").Range("A8").Value = AccountNumbers.Text
    Sheets("FA").Range("A12").Value = CashBalance.Text

    End Sub


    Thanks for any help you can offer.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Using Custom Forms to add a mutil-line text box that enters data into a spreadshe

    Please edit your post to comply with the Forum Rules regarding use code tags for VBA code.

    Per Rule #3:
    Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # button at the top of the post window. If you are editing an existing post, press Go Advanced to see the # button. For more information about these and other tags, click here.
    As soon as you have added to code tags someone will help answer your question.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Registered User
    Join Date
    03-02-2010
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Using Custom Forms to add a mutil-line text box that enters data into a spreadshe

    I am new to VBA. I am trying to create a user-form comprised of six text boxes and an OK and Cancel Command Button. I want the user-form to popup on a specific sheet "FA" when an existing button is clicked (this button clears other areas of data) in the spread sheet and the user to fill in the requested data. The spread sheet generates a form, so I need the data from the user form to go into specific cells in the spread sheet. I will post the code I have below, not much so far.

    Please Login or Register  to view this content.
    Thanks for any help you can offer.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Using Custom Forms to add a mutil-line text box that enters data into a spreadshe

    Use the Edit Button to edit the original post, don't duplicate it

    Your code should work,but why use the UserForm_Click event? Add a button to the form to add the details
    Last edited by royUK; 04-09-2010 at 01:57 AM.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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