Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compatible with Office 97
Can anyone tell me why this Sub sends the Whole Workbook in Excel 97,
what I want to achieve is to send only the "Usage" sheet in all versions of Excel. Thanks Pete Private Sub MailUsageSheet() Dim rng As Range Dim wb As Workbook Dim Arr() As String Dim N As Integer Dim cell As Range Dim strdate As String strdate = Format(Sheets("Usage").Range("B6"), "ddd dd mmm yyyy") Set rng = Sheets("DropDownLists").Columns("Q").Cells.Special Cells(xlCellTypeConstants) ReDim Preserve Arr(1 To rng.Cells.Count) N = 0 For Each cell In rng If cell.EntireRow.Hidden = False And cell.Value Like "*@*" Then N = N + 1 Arr(N) = cell.Value End If Next cell ReDim Preserve Arr(1 To N) Sheets("Usage").Copy Cells.Copy Cells.PasteSpecial xlPasteValues Cells(1).Select Application.CutCopyMode = False ActiveWindow.Zoom = 75 Set wb = ActiveWorkbook With wb .SaveAs "Sack Usage.xls" On Error Resume Next .SendMail Arr, Subject:="Sack Usage " & strdate On Error GoTo 0 .ChangeFileAccess xlReadOnly Kill .FullName .Close False End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
OFFICE XP COMPATIBLE WITH VISTA | Excel Discussion (Misc queries) | |||
Problem sharing spreadsheet between Office10 (Office XP) and Office 11 (Office 2003) | Excel Programming | |||
UDF 2000 compatible? | Excel Programming | |||
UDF 2000 compatible? | Excel Programming | |||
Excel 2003 not compatible with Office 2k Web Components -- HELP! | Excel Programming |