Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 5th, 2004, 10:04 AM
Authorized User
 
Join Date: Jun 2003
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default email an excelsheet using a macro behind a button

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:="[email protected]", 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
 
Old January 6th, 2004, 08:38 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to acdsky
Default

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!
 
Old January 8th, 2004, 04:08 AM
Authorized User
 
Join Date: Jun 2003
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
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 :()





Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to send an email with an attachment in it samputha Excel VBA 2 August 13th, 2009 09:12 PM
Excel Macro - Send Email and Attachments robmill101 Excel VBA 1 October 21st, 2008 08:10 AM
Sending Email Macro wasikai Excel VBA 4 June 27th, 2008 10:49 AM
Need macro to send email via default mail program chutchinson Excel VBA 0 September 27th, 2007 09:28 PM
Option Button & Macro jvanhalderen Excel VBA 2 November 28th, 2004 04:09 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.