+ Reply to Thread
Results 1 to 9 of 9

Tailored button to write value on selected check box

  1. #1
    Registered User
    Join Date
    09-29-2013
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    33

    Question Tailored button to write value on selected check box

    Dear all,
    May I ask your help on this:
    I have a loss tree file, which will be used to record why some weeks sale is lower than forecast. Users will need to click on some weeks, then click on the list of loss tree on the right side & click on button "Record". They need to record each & every week in the chart, and there will be different SKUs to be listed in this sheets.
    What I'm trying to do is: a button that will find where the check box is ticked & which loss tree code is ticked, then write 1 to the range B31:AN46

    I must confess I am a noob in VBA and don't know how to write this. Could anybody help me?

    Thank you
    Thang Tran
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Tailored button to write value on selected check box

    Hi,

    One way, see attached
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    09-29-2013
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: Tailored button to write value on selected check box

    Thank you Buttrey,
    It delivers what I mean perfectly.
    If I want to add in/remove criteria. I need to adjust inside the name manager, is that correct?

    Thank you
    Thang Tran

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Tailored button to write value on selected check box

    Indeed so. Just change the range name as necessary.

    If it's likely to change frequently then I suggest you create a dynamic range name so that everything will adjust automatically and you can forget about it.

    Personally I'd have used a data validation drop down cell to get the input and used the same range name as the source for the list. As a general principle keep things as simple as possible. A forms control is not really necessary and is IMO overcomplicating things.

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Tailored button to write value on selected check box

    OK, glad to have helped and thanks for the rep.

  6. #6
    Registered User
    Join Date
    09-29-2013
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: Tailored button to write value on selected check box

    Hello Buttrey,
    May I ask for your help once again.
    I'm trying to modify the file that you make. However I encounter one problem:
    - the loss code need to input for all weeks that occurs the same loss. I cannot input weeks separately, for example: Select W1-5 with loss code 1, then deslected week & move to loss code 2. However, later on at week 30, it occurs same loss code 1. If I dont tick week 1-5 again, it will delete everything I tick before that.

    --> could you help edit for me: I just want the code to record exactly the loss code at week that is ticked.

    Thank you in advance
    Thang Tran
    Attached Files Attached Files

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Tailored button to write value on selected check box

    Hi,

    Does the attached help
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    09-29-2013
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: Tailored button to write value on selected check box

    Thank you Buttrey for quick reply,
    Hmm, however it not work properly. somehow it keep retun to record week 10 & week 14...
    Could you have a second look pls
    Thank you

  9. #9
    Registered User
    Join Date
    09-29-2013
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: Tailored button to write value on selected check box

    Sorry Buttrey,
    Could you please help me re-read the file please, the new macro is not working.
    Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How to check if option button has been selected within a frame
    By SoulPrisoner in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-10-2013, 07:30 AM
  2. Grey out check box based on a selected radio button
    By tlacloche in forum Excel General
    Replies: 16
    Last Post: 08-28-2013, 05:36 AM
  3. Replies: 1
    Last Post: 12-07-2012, 05:35 AM
  4. How to merge specific data from tailored coded worksheets in a workbook?
    By NNguyen9 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-24-2012, 02:02 PM
  5. Uncheck Check Box + check a option button using Command Button
    By Carlsbergen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2009, 03:09 AM

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