Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that emails the ActiveSheet to people in a certain range on
another sheet. The sheet being emailed has a code to name the sheet the value of cell A3. The sheet is copied into another workbook before it emails. Is there a way to have the code to name the sheet deleted and the sheet be named what it is when copied? I dont want anyone to be able to accidentally change the sheet name when they receive it. The code I use is: Sub Mail_Report() Dim wb As Workbook Dim strdate As String strdate = Format(Now, "dd-mm-yy h-mm-ss") Application.ScreenUpdating = False ActiveSheet.Copy Application.CutCopyMode = False Set wb = ActiveWorkbook With wb .SaveAs ActiveSheet.Name Dim MyArr As Variant MyArr = ThisWorkbook.Sheets("Email").Range("b16:b31") .SendMail MyArr, ActiveSheet.Name & " " & "2005" & " " & "-" & " " & "Offshore P&A Activity Report" & " " & "****CONFIDENTIAL****" .ChangeFileAccess xlReadOnly Kill .FullName .Close False End With Application.ScreenUpdating = True End Sub Thanks, Chance |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel sheet bootom half sheet goes behind top part of sheet | Excel Worksheet Functions | |||
Duplicate sheet, autonumber sheet, record data on another sheet | Excel Worksheet Functions | |||
How do I select price from sheet.b where sheet.a part no = sheet.b | Excel Worksheet Functions | |||
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. | Excel Discussion (Misc queries) | |||
Inserting a row in sheet A should Insert a row in sheet B, removing a row in Sheet A should remove the corresponding row in sheet B | Excel Programming |