Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error message
I wrote a macro in excel that allows users to e-mail the excel file as
an attachment. To do this I used the ActiveWorkbook.SendMail, along with a UserForm so they can choose either to send the mail or to cancel. Below is my code for the button that sends the e-mail: Dim Subj Subj = "" & ActiveWorkbook.Name & " New Prod. Req Approval" ActiveWorkbook.SendMail ", Subject:=Subj Me.hide MsgBox ("Your E-mail Has Been Sent") The file sends fine, but the problem I am having is when you close the file after sending the e-mail. When you close the file and it asks you, do you want to save changes? If you choose NO, everything is fine. But if you choose yes, you get an error message from Dr. Watson for Windows NT. The message says: An application error has occurred and an application error log is being generated. EXCEL.exe Exception: access violation (Oxc0000005), Address 0x6512be2d Then three buttons OK, Cancel, Help Does anyone have any ideas why I am getting this message? I cannot figure it out. Thanks, Michelle |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error message
Michelle
not sure why unless it's because the form is still open (you've only hidden it in your code) Why not look at Ron de Bruin's site for some ideas and code ... superb mail sending utility ! Might be worth using this rather than roll your own. Nearly forgot .... http://www.rondebruin.nl/ Regards Trevor "Michelle" wrote in message om... I wrote a macro in excel that allows users to e-mail the excel file as an attachment. To do this I used the ActiveWorkbook.SendMail, along with a UserForm so they can choose either to send the mail or to cancel. Below is my code for the button that sends the e-mail: Dim Subj Subj = "" & ActiveWorkbook.Name & " New Prod. Req Approval" ActiveWorkbook.SendMail ", Subject:=Subj Me.hide MsgBox ("Your E-mail Has Been Sent") The file sends fine, but the problem I am having is when you close the file after sending the e-mail. When you close the file and it asks you, do you want to save changes? If you choose NO, everything is fine. But if you choose yes, you get an error message from Dr. Watson for Windows NT. The message says: An application error has occurred and an application error log is being generated. EXCEL.exe Exception: access violation (Oxc0000005), Address 0x6512be2d Then three buttons OK, Cancel, Help Does anyone have any ideas why I am getting this message? I cannot figure it out. Thanks, Michelle |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error message
Trevor,
Thanks for the web site. I think I'm just going to have to write my code another way. I did try to unload the form, but that did not help. I still got the error. The really weird part is that if I use the form/code in my personal.xls file it works fine, no error. I'm completely lost on this one. Michelle "Trevor Shuttleworth" wrote in message ... Michelle not sure why unless it's because the form is still open (you've only hidden it in your code) Why not look at Ron de Bruin's site for some ideas and code ... superb mail sending utility ! Might be worth using this rather than roll your own. Nearly forgot .... http://www.rondebruin.nl/ Regards Trevor "Michelle" wrote in message om... I wrote a macro in excel that allows users to e-mail the excel file as an attachment. To do this I used the ActiveWorkbook.SendMail, along with a UserForm so they can choose either to send the mail or to cancel. Below is my code for the button that sends the e-mail: Dim Subj Subj = "" & ActiveWorkbook.Name & " New Prod. Req Approval" ActiveWorkbook.SendMail ", Subject:=Subj Me.hide MsgBox ("Your E-mail Has Been Sent") The file sends fine, but the problem I am having is when you close the file after sending the e-mail. When you close the file and it asks you, do you want to save changes? If you choose NO, everything is fine. But if you choose yes, you get an error message from Dr. Watson for Windows NT. The message says: An application error has occurred and an application error log is being generated. EXCEL.exe Exception: access violation (Oxc0000005), Address 0x6512be2d Then three buttons OK, Cancel, Help Does anyone have any ideas why I am getting this message? I cannot figure it out. Thanks, Michelle |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error message
Michelle
searching Technet with "access violation excel watson" lists 32 topics. Not sure which might be relevant to you as I don't know what version you are using or what exactly you are doing. Try searching the Microsoft knowledge base with the above search keys http://support.microsoft.com/search/...3D2057%26CDID% 3DEN-US-KB%26PRODLISTSRC%3DON&Product=&KeywordType=ANY&Tit les=false&numDays= &maxResults=25&withinResults=false&Queryl=access+v iolation+excel+watson&Quer y=access+violation+excel+wa Sorry I can't be more help Regards Trevor "Michelle" wrote in message om... Trevor, Thanks for the web site. I think I'm just going to have to write my code another way. I did try to unload the form, but that did not help. I still got the error. The really weird part is that if I use the form/code in my personal.xls file it works fine, no error. I'm completely lost on this one. Michelle "Trevor Shuttleworth" wrote in message ... Michelle not sure why unless it's because the form is still open (you've only hidden it in your code) Why not look at Ron de Bruin's site for some ideas and code ... superb sending utility ! Might be worth using this rather than roll your own. Nearly forgot .... http://www.rondebruin.nl/ Regards Trevor "Michelle" wrote in message om... I wrote a macro in excel that allows users to e-mail the excel file as an attachment. To do this I used the ActiveWorkbook.SendMail, along with a UserForm so they can choose either to send the mail or to cancel. Below is my code for the button that sends the e-mail: Dim Subj Subj = "" & ActiveWorkbook.Name & " New Prod. Req Approval" ActiveWorkbook.SendMail ", Subject:=Subj Me.hide MsgBox ("Your E-mail Has Been Sent") The file sends fine, but the problem I am having is when you close the file after sending the e-mail. When you close the file and it asks you, do you want to save changes? If you choose NO, everything is fine. But if you choose yes, you get an error message from Dr. Watson for Windows NT. The message says: An application error has occurred and an application error log is being generated. EXCEL.exe Exception: access violation (Oxc0000005), Address 0x6512be2d Then three buttons OK, Cancel, Help Does anyone have any ideas why I am getting this message? I cannot figure it out. Thanks, Michelle |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error message
Trevor,
Thanks for the info. I ended up using a different code to send the e-mail and I don't get any more error messages. Thanks again. Michelle |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF(AND) error message | Excel Worksheet Functions | |||
Getting Rid of Error Message | Charts and Charting in Excel | |||
VBA Error Message "Compile Error...." | Excel Discussion (Misc queries) | |||
changing the message in an error message | Excel Worksheet Functions | |||
How do I get rid of "Compile error in hidden module" error message | Excel Discussion (Misc queries) |