Results 1 to 4 of 4

Sending a worksheet through email by VBA

Threaded View

  1. #1
    Registered User
    Join Date
    01-17-2009
    Location
    dunfermline, scotland
    MS-Off Ver
    Excel 2003
    Posts
    8

    Sending a worksheet through email by VBA

    Hello,

    I have the following piece of code that copies the active excel sheet in a workbook and saves it to a temporary file in preparation for it being sent via email. I need to modify the code to select a named sheet instead of the active sheet. Would appreciate a few pointers.

    ActiveSheet.Copy
    Set WB = ActiveWorkbook
    FileName = Range("Subject") & " Text.xls"
    On Error Resume Next
    Kill "C:\" & FileName
    On Error Goto 0
    WB.SaveAs FileName:="C:\" & FileName

    cheers
    Last edited by getshorty; 04-03-2012 at 01:19 PM. Reason: Have inserted code tags but dont see usual screen

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