Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default 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

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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
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
IF(AND) error message mr_concrete Excel Worksheet Functions 5 February 6th 07 08:11 PM
Getting Rid of Error Message rvExcelNewTip Charts and Charting in Excel 7 January 14th 06 02:10 PM
VBA Error Message "Compile Error...." Steve Excel Discussion (Misc queries) 3 July 15th 05 09:20 AM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM
How do I get rid of "Compile error in hidden module" error message David Excel Discussion (Misc queries) 4 January 21st 05 11:39 PM


All times are GMT +1. The time now is 01:49 PM.

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"