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

Thread: macro for data form

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

    Default

    Must be dementia creeping up on me, but I cannot remember how to do a tiny 2 or 3 step macro for a button on a worksheet to open a data form for info entry for that worksheet. When creating the macro and getting the form for data layout of that sheet, working those steps, I can't close the form and then go to tools and stop the macro recording and have the macro run. Can someone please tell me what foolish step I'm missing? Thanks in advance. Bob

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Location
    Jefferson City, Missouri
    Posts
    382
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    just add userform1.show to your command button click event. this will bring up your user form for data. if you have a cancel button on your user form add unload userform1 to its click event. if you have a button on your form that posts your data to the worksheet then add unload userform1 to the end of the macro.

    HTH
    I appreciate the help from everyone at Mr. Excel.

    viper

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Huntington Beach, CA USA
    Posts
    327
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Private Sub CommandButton_Click()
    UserForm1.Show
    End Sub

    Private Sub CommandButton2_Click()
    UserForm1.Hide
    End Sub

    James

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
  •