Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: Command buttons and text boxes..

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I'm trying to create a form that a user inputs some data (for instance - name, userid, staff position) and then use a command button to send the data to another sheet to form a table (a database basically). I'm aware of the form option under the data menu, but wondered whether its possible to create a form with button to do the process instead.

    [ This Message was edited by: uk-james on 2002-03-05 09:43 ]

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sunny, spring-like Hull
    Posts
    3,339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Ooof, now you're talking .

    To create a userform, go into the VBA editor (right-click on any sheet tab and select view code). From the editor menu choose Insert and then UserForm. This will give you a blank form and (should, if not press View and Toolbox) show the UserForm toolbox. Select which controls you want and 'draw' them onto the form (probably a few text boxes and a command button for your purposes). Double click on the command button once it's on the form, and this will set up an event subroutine for you. The code you write in there will occur once you press the command button. To run the userform, just press F5.

    There's plenty of code examples on this site (use the search function), and the help files for VBA are pretty extensive, just select what you want to know about and press F1. If you get into difficulties with a specific thing, just post your question here, there's loads of extremely knowledgeable (much more so than me )people willing to help you out. Hope this gets you started OK and good luck.

    [ This Message was edited by: Mudface on 2002-03-05 10:43 ]

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    wow reply to mine plz . i really need help! its 40% of d course

  4. #4
    Guest

    Default

    How do you send the data (that you filled into the text boxes) to go to the table/database that is located on the excel sheet. Cos it needs to be able to create a new record each time you use the form, rather than overwriting itself each time. I've looked under this site's main search engine and the forum's serach engine to no avail. mucho help needed

  5. #5
    Guest

    Default

    ^bump^

  6. #6
    New Member
    Join Date
    Mar 2002
    Location
    England
    Posts
    46
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    the way that i did this was to,
    1. create a copy of the titles of the database in another location

    2. send the details under these headings

    3. create a dummy value above the first column of the headings on the main database

    4. then record a macro to copy these details, then click on the dummy cell,

    5. switch to relative referencing, press ctrl+down and then down once,switch back to absolute referencing

    6. Paste special and choose 'values'. then stop recording

    Your new details should be below the existing ones.


Some videos you may like

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
  •