+ Reply to Thread
Results 1 to 2 of 2

Use checkboxes to select worksheets to email

  1. #1
    Registered User
    Join Date
    05-19-2010
    Location
    Iowa
    MS-Off Ver
    Excel 2003
    Posts
    1

    Use checkboxes to select worksheets to email

    I have a workbook with about 15 worksheets. What I am trying to do is to create a form with checkboxes (one corresponding to each worksheet) to let the user choose which worksheets to include in a new email using Sendmail.

    This is what I have so far...

    Private Sub CommandButton1_Click()

    Dim recipient As String
    recipient = Range("A4").Value

    Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Copy

    With ActiveWorkbook

    .SendMail Recipients:=recipient, Subject:="Renewal forms " & Format(Date, "dd/mmm/yy")

    .Close SaveChanges:=False

    End With

    End Sub


    This all works... all I need to do now is to be able to somehow create the array of sheets based on the checkboxes selected. I hope this makes sense. Any pointers or suggestions would be greatly appreciated.

    Thanks!!

  2. #2
    Forum Contributor wamp's Avatar
    Join Date
    11-10-2008
    Location
    Norway
    MS-Off Ver
    97, 2000 & 2003 (diff. workstations)
    Posts
    184

    Re: Use checkboxes to select worksheets to email

    First off: read the rules and change your post accordingly.


    2ndly, see attachment.
    Attached Files Attached Files
    Last edited by wamp; 05-20-2010 at 02:57 AM.
    _______________________________________________
    Remember:

    Read the rules!

    Use code tags! Place [CODE] before the first line of code and [/CODE] after the last line of code.

    Mark your post [SOLVED] if it has been answered satisfactorily.
    To do this, click EDIT in your original post, click GO ADVANCED and set the PREFIX. It helps everybody!

    If you are approve (or disapprove) of any members response to your problem, please click the star icon underneath their post and comment. It matters.

+ 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