+ Reply to Thread
Results 1 to 3 of 3

Trying to get checkbox to activate different worksheet

  1. #1
    Registered User
    Join Date
    08-22-2009
    Location
    londonengland
    MS-Off Ver
    Excel 2007
    Posts
    12

    Trying to get checkbox to activate different worksheet

    I have 2 checkboxes on my userform. Checkbox 1 is for personal day and checkbox 2 is for holidays. What I am trying to do is when I select checkbox 1 (personal day) I want the userform to populate worksheet (Printable version). That is working. However, when I select checkbox 2 (holidays) It does not update the worksheet (Holiday Printable version). Would somebody mind taking a look at my workbook and steering me in the right direction. I am not very familiar with vba but I find it interesting. I have many hours into this but now I am really stuck. Thank You.
    Attached Files Attached Files

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

    Re: Trying to get checkbox to activate different worksheet

    Do you mean
    Please Login or Register  to view this content.
    I can't see the point in forcing users to close the form using your button, personally I find it annoying when this happens
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Trying to get checkbox to activate different worksheet

    Hi Nemo5;

    Here's a file that should get you started in the right direction.
    I changed the checkboxes to radio buttons. That way only 1 can be checked at a time. With checkboxes, they could both be checked.

    Here's a suggestion. Make the "Print Form" button disabled to start. When the info has been added to a sheet, then enable it.

    Another suggestion. Name the cells in the sheets. Example name D6 "Name".
    Then in CmdAdd_Click you would ".Range("Name").Value = Me.txtName.Value". That way when you move "Name" to some other spot on the sheet, you don't have to remember to change the address in your form.
    BTW, "Me.txtName" is not necessary "txtName" will work. You'll see that I use "Opt_Personal", not "Me.Opt_Personal"

    Edit:
    I just noticed the title to this thread. Do you really want to "Activate" the sheets and hide the form?
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

+ 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