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: 96
Default worked yesterday- doesn't work today

heres the code i was using. Yesterday it worked perfectly. I have the email
in my inbox to prove it. Today when i use it i get this error. Run Time Error
1004 Application defined or object defined error. I haven't changed a thing
in the file.

Private Sub Send2_Click()

Dim wb As Workbook
Dim strdate As String
strdate = Format(Now, "dd-mm-yy h-mm-ss")
ActiveSheet.Copy
Set wb = ActiveWorkbook
With wb
.Sheets(1).Name = .Sheets(1).Range("B4").Value
.SaveAs .Sheets(1).Range("B4").Value _
& ".xls"
ActiveWorkbook.SendMail "", _
"Inactive Employee Attendance Data"
ActiveWorkbook.ChangeFileAccess xlReadOnly
Kill ActiveWorkbook.FullName
ActiveWorkbook.Close False
End With
End Sub


Thanks for the help.
 
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
File saved yesterday is blank today, how do I retrieve? MelB New Users to Excel 2 February 12th 10 03:56 PM
when i save a file that i have worked on, excel7 closes down work. rob Excel Discussion (Misc queries) 2 February 11th 10 07:10 AM
Formula to work out hours worked Shazza Excel Discussion (Misc queries) 4 January 21st 07 11:52 PM
Formula doesn't work this morning, but worked for 2 years now Rhop Excel Worksheet Functions 1 October 11th 06 01:54 PM
countif(a1:a12,">TODAY()") How do I get this to work? Dan Bork Excel Worksheet Functions 1 November 11th 04 10:54 PM


All times are GMT +1. The time now is 04:00 PM.

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

About Us

"It's about Microsoft Excel"