+ Reply to Thread
Results 1 to 7 of 7

MACRO - Autopopulate message with checkboxes

  1. #1
    Registered User
    Join Date
    08-08-2005
    Posts
    76

    Question MACRO - Autopopulate message with checkboxes

    Is it possible for Excel Macro to provide a summary from a set of checklist boxes? I am OK with the checklist side of things, but can't seem to figure out the summary macro side of things.

    For example:

    5kg apple, Tick (YES/NO)
    2kg tomatoes, Tick (YES/NO)
    5kg cucumbers, Tick (YES/NO)
    1kg mushrooms, Tick (YES/NO)

    Let's say I tick YES for 5kg apple + 5kg cucumbers - Is it possible to have a summary message to state as follows:

    Today's incoming inventory is as follows:
    * 5kg apple
    * 5kg cucumbers

    Thats it - the macro only needs to create a summary and copy to clipboard that I can paste to an email message.

  2. #2
    Valued Forum Contributor meabrams's Avatar
    Join Date
    10-03-2014
    Location
    USA
    MS-Off Ver
    2007, 2010, 2013, 2016
    Posts
    451

    Re: MACRO - Autopopulate message with checkboxes

    Are you looking for a userform to input the information or are you just wanting to pull the information from the checkbox on the excel sheet. For the e-mail is there certain person it is going to always be e-mailed to or is it going to be different all the time?

  3. #3
    Valued Forum Contributor meabrams's Avatar
    Join Date
    10-03-2014
    Location
    USA
    MS-Off Ver
    2007, 2010, 2013, 2016
    Posts
    451

    Re: MACRO - Autopopulate message with checkboxes

    Not sure if this is what you are looking for, but here’s what I came up with. It has the ability to send an e-mail through outlook via the e-mail button. Also put another macro in that will store the info to the clipboard so that you can paste it in where you need it…. This one is more along the lines of what you asked for! If these do not work for what you need please let us know so that we can try to help adjust the macro to do more along the lines of what you need!

    I attached a Sample file to see if this is what you need

    Auto E-mail
    Please Login or Register  to view this content.
    Copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-08-2005
    Posts
    76

    Re: MACRO - Autopopulate message with checkboxes

    Thank you for the macro codes meabrams, that helped greatly. I noticed you used similar macro for the email that I also use from rondebruin.nl

    I am trying to understand the new codes for the checkbox on how it works, the final macro will have over 20 checkboxes (I just used 5 as an example), is it possible to squeeze the summary down from: (for example)

    * 5kg apple
    SPACE
    SPACE
    * 1kg mushrooms

    TO

    * 5kg apple
    * 1kg mushrooms

    I am trying to create a condensed clean summary sans the line feed in between them.

  5. #5
    Valued Forum Contributor meabrams's Avatar
    Join Date
    10-03-2014
    Location
    USA
    MS-Off Ver
    2007, 2010, 2013, 2016
    Posts
    451

    Re: MACRO - Autopopulate message with checkboxes

    I will look into eliminating the extra spaces just was trying to get this working first then fine tune after the I found out if this is what you are looking for
    You said that you have 20 plus checkboxes I would need to know exactly how many you have in order to adjust the macro to fit your needs

  6. #6
    Valued Forum Contributor meabrams's Avatar
    Join Date
    10-03-2014
    Location
    USA
    MS-Off Ver
    2007, 2010, 2013, 2016
    Posts
    451

    Re: MACRO - Autopopulate message with checkboxes

    Here’s the updated version that removes the unwanted spaces (newlines) If you want to try updating the macro yourself change the

    cb(1 To 4) As String

    to

    cb(1 To your count) As String

    also change

    For x = 1 to 4

    to

    For x = 1 to your count


    E-mail
    Please Login or Register  to view this content.
    clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by meabrams; 08-07-2016 at 10:19 PM.

  7. #7
    Registered User
    Join Date
    08-08-2005
    Posts
    76

    Question Re: MACRO - Autopopulate message with checkboxes

    Excellent! =D

    Many thanks Meabrams - sorry for the late reply, I was off sick with the flu

    I am learning quite a few new codes from your script I have never encountered before.

    With regards to the following code:

    Please Login or Register  to view this content.
    You used the actual caption of the Checkbox

    I have my checkbox on one cell, description in the other where I can impose conditional formatting as per attached XLSM file.

    Is it still possible for each checkbox to read another cell's text?
    Attached Files Attached Files

+ 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] Autopopulate macro, needs to searrch for appropriate section to autopopulate
    By Butcher1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-09-2015, 09:11 AM
  2. Print Sheets based on checkboxes in UserForm, Checkboxes also control another macro
    By krackaberr in forum Excel Programming / VBA / Macros
    Replies: 34
    Last Post: 03-05-2013, 11:12 AM
  3. Macro to autopopulate a form in open webpage
    By beepbeep27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-16-2012, 12:47 PM
  4. Referencing, checkboxes, message boxes, using other workbooks
    By ChrisHarrellCCC in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-27-2011, 06:01 PM
  5. Macro to autopopulate references
    By ab11viva in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-22-2009, 12:08 PM
  6. autopopulate using a macro question
    By sous2817 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2007, 04:29 AM
  7. how do i create a macro to clear checkboxes and display a message.
    By Xavierskyrider in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-25-2005, 06:06 PM

Tags for this Thread

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