Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Yes
-- Jacob "Neil Holden" wrote: Do i place that at the bottom of my code? i need it to automatically clear once the file is attached? "Jacob Skaria" wrote: Do you mean 'For Contiguous range Range("A1:A10").Clear 'For non-contiguous range Range("A1,B2,C3").Clear -- Jacob "Neil Holden" wrote: Is it possible to clear a range of cells so that it defaults back to template once the user clicks the button, below is code to attach the excel woorkbook in an email and once emails i want it to clear certain cells. Sub Mail_Button66_Click() 'Working in 97-2007 Dim wb As Workbook Set wb = ActiveWorkbook If Val(Application.Version) = 12 Then If wb.FileFormat = 51 And wb.HasVBProject = True Then MsgBox "There is VBA code in this xlsx file, there will be no VBA code in the file you send." & vbNewLine & _ "Save the file first as xlsm and then try the macro again.", vbInformation Exit Sub End If End If On Error Resume Next wb.SendMail "", _ "This is the Subject line" On Error GoTo 0 End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
importing/linking data from an Access 2003 Query to an Excel 2003 | Excel Discussion (Misc queries) | |||
Convert Excel 2003 spreadsheet into Outlook Contacts table 2003 | Excel Discussion (Misc queries) | |||
import Excel 2003 file into Outlook 2003 - NO NAMED RANGES?? | Excel Discussion (Misc queries) | |||
Copying Excel 2003 Selection into Outlook 2003 HTML E-Mail Message | Excel Discussion (Misc queries) | |||
Excel 2003 Database Driver Visual FoxPro 7 on Server 2003. | Excel Discussion (Misc queries) |