LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Subscript out of Range Q

I have the folloing coding trying to e-mail to addresses in AA6 & AB6 but
I'm getting a 'Sunscript out of Range' debug message. It says the MyArr is
empty yet its not I have e-mail addresses in both AA6 and AB6

My code is as follows, any help appreciated

Sub Mail_Reports()
Dim wb As Workbook
Dim strdate As String
Dim MyArr As Variant
strdate = Format(Now, "dd-mm-yy h.mm")
Application.ScreenUpdating = False
Sheets("E-Mys Shop").Visible = True
Sheets("E-Mys Shop").Copy
Set wb = ActiveWorkbook
With wb
.SaveAs ThisWorkbook.Name _
& " Sent on" & " " & strdate & ""
MyArr = Sheets("Home").Range("AA6:AB6")
.SendMail MyArr, Sheets("Home").Range("X15").Value

.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
Application.ScreenUpdating = True
Sheets("E-Mys Shop").Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("Home").Select
Range("A1").Select
End Sub


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subscript Out of Range Al Excel Programming 5 September 22nd 04 07:07 PM
Subscript out of range Bill Murphy Excel Programming 1 August 5th 04 08:52 AM
Subscript out of range? Jason Hancock Excel Programming 3 May 26th 04 07:11 PM
Subscript out of range Stacy Haskins[_2_] Excel Programming 4 April 10th 04 05:41 AM
Subscript out of range Ed Excel Programming 1 February 5th 04 07:17 PM


All times are GMT +1. The time now is 07:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"