Subject: email an excelsheet using a macro behind a button
Posted By: Haroldd Post Date: 1/5/2004 9:04:35 AM
Hi,

i've got an excelsheet which users can fill in. The meaning is to use this sheet on our intranet. Once they filled it in they must send this file to the appropriate person. To make this as easy as possible i've created a macro to do the "send-part".

on my intranet i've got a link which points to the excelsheet on the server. It opens in a new explorer window without de explorer toolbars and statusbars. When i run the macro on a machine which uses excel xp it works fine. But most of our company still runs excel 97 and then i always get a '1004'-error.

I've searched around a bit on the internet and found out that this is some sort of design-error in excel 97 which has disappeared since excel 2000. I also found a work around for it (kb article 177527) but this is only useable when u use a command button and i use a "form-button". I use a "form-button" because otherwise if i use a command-button the sheet needs to open another window before it can execute it's code. I just want to keep it simple for the users so i don't like it if another screen pops up.

my macro:

Sub sendMail()
    ActiveWorkbook.SendMail Recipients:="a@b.com", Subject:="test", ReturnReceipt:=True
End Sub

sorry for the "fuzzy" story but if it makes a bit sense to anyone then plz give some advice.

Harold
Reply By: acdsky Reply Date: 1/6/2004 7:38:17 AM
Hi

Do you need the excel functionality on the form? If not why dont you use a web form so submit the completed from? If this would make things easier I could send you a page with this functionality if you not familier with asp.

Regards
Marnus

Such is Life!
Reply By: Haroldd Reply Date: 1/8/2004 3:08:16 AM
quote:
Originally posted by acdsky

Hi

Do you need the excel functionality on the form? If not why dont you use a web form so submit the completed from? If this would make things easier I could send you a page with this functionality if you not familier with asp.

Regards
Marnus

Such is Life!



well i guess i need the excel functionality, because i first need to open the excelform in an window, then let the user fill it in and then the user needs to send the filled-in form. With using asp it will be tricky (don't know if it's even possible) to open the excelform and then let the user send the filled-in form (it must also be a bit of userfriendly interface, for as far as that is possible with this "excel/internet explorer"-combination )

Go to topic 7912

Return to index page 973
Return to index page 972
Return to index page 971
Return to index page 970
Return to index page 969
Return to index page 968
Return to index page 967
Return to index page 966
Return to index page 965
Return to index page 964