+ Reply to Thread
Results 1 to 4 of 4

Mail with macro Excel 2010

Hybrid View

  1. #1
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: Mail with macro Excel 2010

    hi Santors
    please edit yr post adding [] before yr first line of code and [/] after tle last line. add the word code in between
    Regards, John55
    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.

    ...enjoy -funny parrots-

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Mail with macro Excel 2010

    Hey Here is the code ,
    Code:
    Option Explicit
    
    Sub Dave()
    
    Dim strDate As String
    
            Range("B8").Value = "61000"
               ActiveSheet.Copy
                 strDate = Format(Date, "dd-mm-yy") & " " & Format(Time, "h-mm-ss")
                    ActiveWorkbook.SaveAs "Test Stockholm" & ThisWorkbook.Name _
                       & " " & strDate & ".xlsm", FileFormat:=52
                    ActiveWorkbook.SendMail "your.email@gmail.com", _
                    "Test Bonus "
                 ActiveWorkbook.ChangeFileAccess xlReadOnly
              Kill ActiveWorkbook.FullName
            ActiveWorkbook.Close True
    
    End Sub
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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