+ Reply to Thread
Results 1 to 16 of 16

Enter form details into different sheets on checkbox value

  1. #1
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Enter form details into different sheets on checkbox value

    Hi Guys,

    I've got one more problem to solve with my current project. An example of the workbook is attached.

    What i want to do is change the code on my 'enter button' of the 'input form' which can be shown by clicking the 'Add New Hedge' button on the summary sheet.

    The change i want to make is when the user clicks 'enter', if the 'settle now' checkbox is false to add the details of the form to the unsettled hedges form as it currently does.

    If the 'settle now' checkbox value is true then i want the form details to be added to the next available row on 'settled hedges' worksheet, in the same way it currently does for adding into the next available row of the 'unsettled hedges' sheet. Also here, i would want the value of the 'returns' textbox added to be added into column L rather than the text "unsettled". This would also mean when the 'settle now' checkbox is true that the 'returns' textbox needs to have a value before adding any details.

    Thanks,
    Adam.
    Last edited by adam2308; 12-03-2009 at 12:43 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: Enter form details into different sheets on checkbox value

    looking at the code that you have so far im sure you will be able to figure things out from here.

    One approach to assinging the values to diffrent sheets based on the checkbox.
    Please Login or Register  to view this content.
    nice bit of code you had here well done.

    cheers/


  3. #3
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Enter form details into different sheets on checkbox value

    Thanks for that D_Rennie, still got a couple of issues though, hopefully someone can help.

    First of all, the code you written had the details going into "Unsettled Hedges" when the checkbox was true and going into "Settled Hedges" when the checkbox was false and it should have been the opposite way around. This was easy enough to swap around but just thought i'd clear that up in case i was unclear in the first place.

    One other issue that i am unsure of how to rectify is when the 'settle now' checkbox is unticked the 'returns' textbox does not need a value but currently the code at the top of the procedure is stopping the details from being entered.

    Attached is the latest version of the workbook.

    I'd very much appreciate any help.
    Attached Files Attached Files
    Last edited by adam2308; 12-01-2009 at 10:21 AM. Reason: Add Attachment

  4. #4
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Enter form details into different sheets on checkbox value

    I also now have an issue with date being entered in U.S. style. For example when i enter 1st Dec 2009 through the calendar on the input form it goes into the worksheets as 12th Jan 2009.

  5. #5
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Enter form details into different sheets on checkbox value

    Can anyone please help me on posts 3 and 4 of this thread.

    Many Thanks,
    Adam.

  6. #6
    Valued Forum Contributor JeanRage's Avatar
    Join Date
    03-02-2009
    Location
    Nice, France
    MS-Off Ver
    Excel 2003
    Posts
    705

    Re: Enter form details into different sheets on checkbox value

    Hi Adam,

    Just downloaded your latest file ...
    1. Found no problem with the date : US format vs European format ...
    2. As far as CheckBox1 is concerned, what exactly are you expecting in both cases ...(ticked, unticked)

    HTH

  7. #7
    Valued Forum Contributor JeanRage's Avatar
    Join Date
    03-02-2009
    Location
    Nice, France
    MS-Off Ver
    Excel 2003
    Posts
    705

    Re: Enter form details into different sheets on checkbox value

    Adam,

    For your eyes only .... have increased the size of your calendar form ...
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Enter form details into different sheets on checkbox value

    Sorry Jeanrage, the attachment i posted had the code missing from the top of the procedure which checks the form for missing details. (no wonder i wasn't getting any replies!!).
    Please Login or Register  to view this content.
    I have re-attached file with correct code this time.

    What i want is when the 'settle now' checkbox is ticked the form needs to check if the 'returns' textbox' has a value but when unticked it doesn't.
    Attached Files Attached Files
    Last edited by adam2308; 12-02-2009 at 06:39 AM.

  9. #9
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Enter form details into different sheets on checkbox value

    I've sorted the problem with checking the correct form controls whether the checkbox is ticked/unticked now. It might not be the best way of writing the code but it does the job so i am happy with it.

    I still have the problem with the date format though. If i click 'Add New Hedge' button and then then click the calendar icon to open the calendar form and then choose a date. The format shows correctly in the textbox (dd/mm/yyyy) on the input form but when i fill in all the other details and click the enter buttton then the date is entered into column A of 'unsettled hedges' / 'settled hedges' and the session log sheet in US stlye (mm/dd/yyyy).

    Can someone tell me what i need to change in my code to keep the european fomat when entered into the cells of the worksheets.

    Attached is my latest version for your reference.

    Thank You,
    Adam.
    Attached Files Attached Files
    Last edited by adam2308; 12-02-2009 at 05:44 PM.

  10. #10
    Valued Forum Contributor JeanRage's Avatar
    Join Date
    03-02-2009
    Location
    Nice, France
    MS-Off Ver
    Excel 2003
    Posts
    705

    Re: Enter form details into different sheets on checkbox value

    Hi,

    Have you checked in your Control Panel, your Regional and Language options ...?

    HTH

  11. #11
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Enter form details into different sheets on checkbox value

    Everything is set to English (United Kingdom) and the date examples look fine.

    I think i will mark this thread as solved and start a new one just concerning the date problem, so the thread is not as cluttered as this one.

  12. #12
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: Enter form details into different sheets on checkbox value

    Hello adam

    sorry for the late reply.

    for the number formatting does this help.
    Please Login or Register  to view this content.
    looks like you got everythink sorted. ill look into the file a little ater tonight or tomrow as the worksheet code i gave is messy.

    cheers

  13. #13
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Enter form details into different sheets on checkbox value

    tried adding this
    Please Login or Register  to view this content.
    but made no difference for me.

    Thanks anyway. Let me know if you have any other ideas please.

    Many thanks.

  14. #14
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: Enter form details into different sheets on checkbox value

    Ive made some changes to the code that seam to fix the problem.(though it is getting late and i could be seeing things. )

    Please Login or Register  to view this content.
    cheers

  15. #15
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: Enter form details into different sheets on checkbox value

    Actually swapout
    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.
    that looks better now the fog has cleared.
    cheers

  16. #16
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Enter form details into different sheets on checkbox value

    That's the one. Thanks for all your help on this!!

    I'll add my aparoval to your reputation now.

+ 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