+ Reply to Thread
Results 1 to 27 of 27

Send only Ranges selected with Userform - Not the entire sheet

  1. #1
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Send only Ranges selected with Userform - Not the entire sheet

    Hello All,

    I have uploaded a workbook that has a range of data in cells from Column B to Column N

    I have created a Userform and when selecting the desired months that is to be emailed - the entire sheet is being sent

    Any thoughts


    Best Regards,

    John
    Attached Files Attached Files
    Last edited by JJFletcher; 06-14-2016 at 09:09 AM. Reason: Spelling

  2. #2
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Send only Ranges selected with Userform - Not the entire sheet

    I have been looking at this code and seeing if it will work... it selects the ranges needed but fails at the select range at the end of the code for the email... any idea's?

    Please Login or Register  to view this content.
    Any Thoughts,

    John

  3. #3
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Is this a question that has no answer??

    Is this the wrong area for this question... Can someone see if this code is appropriate and why it does not function correctly?

    Please Login or Register  to view this content.
    Best Regards,

    John

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,909

    Re: Send only Ranges selected with Userform - Not the entire sheet

    This does the same as your code.
    Please Login or Register  to view this content.
    But what is to happen with selection because now only SelectRange is selected and then ...nothing.
    Last edited by bakerman2; 06-11-2016 at 08:33 AM.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Send only Ranges selected with Userform - Not the entire sheet

    But what is to happen with selection because now only SelectRange is selected and then ...nothing. This is a great question... That was the trouble I was having with the other code -

    Instead of the selected ranges being sent - The entire sheet was being sent..

    updated book attachment:



    Any Thoughts

    John
    Attached Files Attached Files
    Last edited by JJFletcher; 06-11-2016 at 10:25 AM.

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,909

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Thoughts Yes but no time left to put it in code.(have to work tonight)

    Instead of selecting ranges hide the columns you don't need. Copy visible cells to temporary sheet then use mailcode to send temporary sheet.
    Tried this manually and works perfect. If you have time to wait I can put it together by tomorrow but for now have to sign off.
    In your example workbook add a new sheet (place it after sheet1) hide a few columns on sheet1 and try next code.
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    08-09-2012
    Location
    British Columbia
    MS-Off Ver
    Excel 2010
    Posts
    189

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Copy visible cells to temporary sheet then use mailcode to send temporary sheet.
    Tried this manually and works perfect.
    @ John

    Isn't that pretty much right along the same lines as snb's suggestion at one of your cross postings.

  8. #8
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Hi Backerman,

    I will look forward to your thoughts tomorrow on this... I will in the man time look at this modification..

    I will check in tomorrow and see if the current code modification you come up with works perfectly

    Thanks in advance

    John

  9. #9
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Send only Ranges selected with Userform - Not the entire sheet

    I have just purchased some Commercial Services... Who would like to assist in this issue so I can get a resolution to this and move forward with my project?

    The last book uploaded has a working code to select the ranges - yet the entire sheet is being sent via email instead of the selected ranges...

    The desire is to have only the selected ranges be emailed and once completed the sheet refreshes back to normal and the userform will close

    Best Regards,

    John
    Last edited by JJFletcher; 06-11-2016 at 05:08 PM. Reason: Grammer

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Hi John

    Your PM quota is full. Delete some items so we can PM. Let me know when you've done so.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  11. #11
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Cleared PM

  12. #12
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Hi John

    You'll need to PM a Forum Moderator or Administrator and ask them to close this Tread as you're posting in Commercial Services.

  13. #13
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,909

    Re: Send only Ranges selected with Userform - Not the entire sheet

    @jaslake

    Is this thread still open for replies because I have the solution ready and waiting ?

  14. #14
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Bakerman,

    it is still open... I would like to see your suggestion...

    You indicated hiding columns and sending selected data to a second sheet - I am wondering how well this will work

    John


    I have been speaking to jaslake but have not reviewed any suggestions as not able to successfully post this issue in the Commercial services
    Last edited by JJFletcher; 06-11-2016 at 07:04 PM.

  15. #15
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Hi bakerman2

    Far as I can tell this Thread has not been closed. Offer up solutions for the OP.

  16. #16
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Send only Ranges selected with Userform - Not the entire sheet

    This is what was sent to the moderator...

    Oh what is an OP???

    I am trying to post a thread to the commercial services so I can get assistance and this is the message I get:

    http://www.excelforum.com/showthread.php?t=1142915


    JJFletcher, you do not have permission to access this page. This could be due to one of several reasons:
    1.Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
    2.If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

    Can you please assist and advise?

  17. #17
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Hi John

    OP is the "Original Poster"...that be you.

  18. #18
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Thanks John

  19. #19
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Hi backerman2

    What solution do you have?

    John

  20. #20
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,909

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Please Login or Register  to view this content.

  21. #21
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Hi Bakerman2,

    When trying to run the code the following error highlighted in yellow:

    Sheets(1).UsedRange.SpecialCells(xlCellTypeVisible).Copy Sheets(2).Range("B1")

  22. #22
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,909

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Did you create second sheet. (place after first sheet).
    Code can also be altered to create temporary sheet and delete afterwards if that better suits your needs.

  23. #23
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Send only Ranges selected with Userform - Not the entire sheet

    I did create the second sheet - pls see attached.... I really like that suggestion - I do not want the user to be thinking there is a second sheet to interact with.

    The second book attached selects the ranges desired but when sending the email it sends the entire sheet instead of the selected ranges...


    Going to dinner - be back soon
    Last edited by JJFletcher; 06-11-2016 at 07:59 PM.

  24. #24
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,909

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Here you go.
    Attached Files Attached Files

  25. #25
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Checking this out now - will get back to you...

    Thanks so much in advance...

    John

  26. #26
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Hi backerman2,

    PM sent - did you see that?

    John

  27. #27
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,909

    Re: Send only Ranges selected with Userform - Not the entire sheet

    Already answered.

+ 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. Send selected cells in email not entire active sheet
    By markhopcraft in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-02-2015, 12:11 PM
  2. Send hyperlink of workbook to selected Outlook User Groups - UserForm?
    By ssteines in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-17-2014, 11:50 AM
  3. [SOLVED] Delete entire row from worksheet, which is selected in 'Listbox1' on Userform
    By p_nayak268 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-26-2013, 08:27 AM
  4. [SOLVED] send attachment selected in userform to a specific cell
    By jjyoung in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2013, 04:14 PM
  5. Send Userform data to selected row
    By revenge4ash89 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-10-2012, 05:09 AM
  6. Send entire workbook/current sheet pop-up box.
    By swellett in forum Excel General
    Replies: 0
    Last Post: 03-17-2006, 01:00 PM
  7. Send entire workbook/current sheet pop-up box.
    By swellett in forum Excel General
    Replies: 2
    Last Post: 03-17-2006, 12:35 PM

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