View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
u473 u473 is offline
external usenet poster
 
Posts: 184
Default E-mail Each WorkSheet in collection to pertaining Manager

Hi Ron,
I launched the macro with Alt-F8 from the active workbook named
WorkbookTest
where 3 small worksheets are residing : 74153, 64001, 61263 (Not in
sequential order. Do they have to ?)
I got the following error : Run-time error '9' Subscript out of range
on : WbData.Worksheets(CStr(cell.Offset(0, -2).Value)).Copy
I cannot figure what's in error.
I put a MsgBox ThisWorkbook.Name to verify at that point that I was
indeed in the Email Workbook

Note : MsgBox WbData.Worksheets(CStr(cell.Offset(0, -1).Value)) gives
me the same error.
I also tried to have the Project Names formatted in the Email workbook
as Number or Text. That did not change the error.
Thank you again for your help.
Celeste