+ Reply to Thread
Results 1 to 6 of 6

enable mail recipient to exploit macro in excel attachment

  1. #1
    Forum Contributor
    Join Date
    03-08-2011
    Location
    London
    MS-Off Ver
    Work Office 365 Home 2019
    Posts
    428

    enable mail recipient to exploit macro in excel attachment

    Hi Folks,

    I have a workbook that I extract a sheet from and send to a recipient on a regular basis. They mark-up that sheet and return it to me.

    I use a macro to extract the spreadsheet and send it to the recipient. - No problems, that works fine.

    I'd like to include a button (the green one in the example) on the spreadsheet that enables the user (in this case the 'secondary' user) the press the button and it activates the macro. at the moment I keep getting it cross reference back to the original file that I did the original extract from.

    I thought I'd cracked it, but due it's difficult to test as the cross reference I mentioned previously, is true.

    Here's the VBA that is in the Sheet Code:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    862

    Re: enable mail recipient to exploit macro in excel attachment

    You could try the following code for reassigning the macro to the Rectangle 1 button:
    Please Login or Register  to view this content.
    The code should be in Workbook_Open() event.
    .. and don't forget to have fun!
    Bogdan.

    mark SOLVED and Add Reputation if my answer pleases you

  3. #3
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    862

    Re: enable mail recipient to exploit macro in excel attachment

    Another approach would be to save the whole workbook as a new file, and then delete the sheets you don't need to send.
    That way you keep the macros and the refrences in place.

  4. #4
    Forum Contributor
    Join Date
    03-08-2011
    Location
    London
    MS-Off Ver
    Work Office 365 Home 2019
    Posts
    428

    Re: enable mail recipient to exploit macro in excel attachment

    Thanks Bulina,

    I don't think I can do your second approach, because the content is generated through a series of index, match and VLookup from other sheets from my "master" workbook. Deleting the sheets would then delete the content.

    Now, I'm going to be "proper dense" here Mindful that the sheet that is sent to the recipient is 'created' from my "Master" workbook, do I enter it on the relevant sheet on my workbook and then it will 'follow-through' as it were with each 'creation'?

    and I kind of understand in principle what you mean when you say it should be in the Workbook_Open() event. But, again, showing my 'denseness' how is that done in reality?

  5. #5
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    862

    Re: enable mail recipient to exploit macro in excel attachment

    Try inserting this code after ActiveSheet.Copy :
    Please Login or Register  to view this content.

    so the entire code would be:


    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    03-08-2011
    Location
    London
    MS-Off Ver
    Work Office 365 Home 2019
    Posts
    428

    Removed to start new thread and prevent confusion

    Sorry folks, deleted this one to create new thread and prevent confusion (mostly on my part!)
    Last edited by MagicMan; 08-27-2019 at 07:10 AM. Reason: New thread created

+ 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. More than one recipient in Lotus Notes mail macro
    By Skybeau in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-07-2009, 09:10 PM
  2. Excel Send to Mail Recipient (as Attachment)
    By Dave in forum Excel General
    Replies: 2
    Last Post: 02-23-2006, 05:15 PM
  3. [SOLVED] Send to mail recipient as attachment not in excel 2002
    By granny in forum Excel General
    Replies: 4
    Last Post: 02-12-2006, 05:10 AM
  4. [SOLVED] cannot send excel worksheet (sheet only) to mail recipient
    By Nancy in forum Excel General
    Replies: 1
    Last Post: 11-09-2005, 05:00 PM
  5. [SOLVED] How do I send an Excel attachment so that the recipient cannot al.
    By Excel Question in forum Excel General
    Replies: 1
    Last Post: 09-06-2005, 11:05 PM
  6. Replies: 1
    Last Post: 06-23-2005, 05:05 PM
  7. [SOLVED] send to mail recipient as attachment - no worky...
    By Scott McDonald in forum Excel General
    Replies: 0
    Last Post: 04-22-2005, 09:08 PM
  8. [SOLVED] Send to Mail Recipient (as attachment) Lags
    By JGas in forum Excel General
    Replies: 0
    Last Post: 02-09-2005, 03:06 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