+ Reply to Thread
Results 1 to 10 of 10

Email to attach sheet s values only for a specific range

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2024
    Posts
    2,873

    Email to attach sheet s values only for a specific range

    I have tried to write code to copy range A1:O50 and to paste these as values and to attach the sheet only for this range as values (no formulas)


    However the entire sheet is being copied including columns with formulas after Col O


    It would be appreciated if someone could kindly amend my code


    Please Login or Register  to view this content.

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: Email to attach sheet s values only for a specific range

    What are you wanting to do with these red snippets...
    Please Login or Register  to view this content.
    copy range A1:O50 and to paste these as values
    Please Login or Register  to view this content.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2024
    Posts
    2,873

    Re: Email to attach sheet s values only for a specific range

    Thanks for the help Sintek

    The first Red Snippet was to only paste the values for the range A1 to O50

    The second red snippet was to delete the new sheet added fter attaching the sheet

  4. #4
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: Email to attach sheet s values only for a specific range

    See code in post 2 that paste values only...


    the delete snippet should actually be a kill command after attaching the newly created workbook...

    Edit...Nope ignore above remark...I see now that you want to delete the newly created sheet...
    So Are you wanting to attach the active workbook

    Or just the copied range to a new book and attach the new book...
    Last edited by Sintek; 12-30-2021 at 04:24 AM.

  5. #5
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: Email to attach sheet s values only for a specific range

    Something tells me...This is what you are trying to do...
    Copy range of specific sheet in active workbook to a new workbook, renaming new workbook active sheet and then saving this new workbook, attaching it in email and the deleting this new workbook...If so, see below...

    For testing, I have left a few things out...Sure you can add again...
    Please Login or Register  to view this content.
    Last edited by Sintek; 12-30-2021 at 04:39 AM.

  6. #6
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2024
    Posts
    2,873

    Re: Email to attach sheet s values only for a specific range

    Thanks for the explanation and help

  7. #7
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Email to attach sheet s values only for a specific range

    maybe after the second snippet from sintek

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2024
    Posts
    2,873

    Re: Email to attach sheet s values only for a specific range

    Your code in Post # 5 was of great help

    I added what I need and it works perfectly

  9. #9
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2024
    Posts
    2,873

    Re: Email to attach sheet s values only for a specific range

    thanks davesth

  10. #10
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: Email to attach sheet s values only for a specific range

    Quote Originally Posted by Howardc1001 View Post
    Your code in Post # 5 was of great help

    I added what I need and it works perfectly
    Glad you got it sorted...Happy Coding...

+ 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] Email range to attach
    By Howardc1001 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-03-2020, 08:22 AM
  2. Macro to create an email, attach current workbook and also paste a range from sheet
    By StormFusion in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2019, 08:32 AM
  3. Marco To Create PDF Using Specific Sheets & Attach To Outlook Email
    By Gtrtim112 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-17-2018, 11:59 PM
  4. attach file in an outlook email from specific folder
    By 9599lorenzo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2017, 07:07 AM
  5. VBA to save a sheet as a PDF and then attach to an email. Almost there.
    By AZZ70 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-06-2015, 03:13 PM
  6. VBA to save one sheet as PDF and attach it to an email
    By KT999 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2014, 03:35 PM
  7. Macro to attach range to email in new sheet but not send?
    By Serafin54 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-22-2014, 01:07 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