473,799 Members | 3,082 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Send worksheet via email using command button

2 New Member
I am very new to visual basic. Actually, I have no clue what I'm doing! But I know what I want to do. I am trying to learn as I go...

How do I create a command button that when clicked will automatically send the worksheet via email to more than one recipient? I have searched and searched and tried different things. This is what I have tried but it didn't work.

Under the command button's code:

Dim Rcpts(1 to 3) As String
Rcpts(1) = "mail1@server.c om"
Rcpts(2) = "mail2@server.c om"
Rcpts(3) = "mail3@server.c om"
ThisWorkbook.Se ndMail Recipients:=Rcp ts, Subject:="test mail", ReturnReciept:= true

The program gives me this when I type in SendMail but I don't know what to do with it:

Sub SendMail (Recipients, [Subject], [ReturnReciept])

As I said, I'm very new at this and do not know all the terms. I didn't realize it would be so complicated!

Thanks for any help given. It will be greatly appreciated!
Jul 11 '07 #1
0 1612

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3517
by: Jeff West | last post by:
Greetings all, I'm not a developer (not even close) but have been teaching myself Access lately and would like to ask the group for some help. I've recently created a employee contact database for my office and each contact in the table is classified into the type of contact they are. Each contact can have more than one of these classifications. What I would like to do is create a button on our entry form that you would be able to...
7
1777
by: farhan wajahat | last post by:
i have made a command button and on the click event of the button following code is mentioned: im mailnew As New MailMessage() mailnew.From = "financialadjustment@mobilink.net" mailnew.To = "farhan.w@mobilink.net" mailnew.Cc = "financialadjustment@mobilink.net" mailNew.Subject = "New Record Entered Successfully" mailNew.Body = "Data successfully entered by user
2
1974
by: mcraven.2 | last post by:
How do you send a browser to a link when a command is given? I've tried using Java Server Pages <jsp:forward /command but that doesn't change the link in the address bar and some other problems arise with it. A javascript method would work in what I'm doing but I don't know what that command would be. Basically, when a button is pressed I want some session data to be set and for a link to be followed. Any ideas?
4
4819
by: hamoraby | last post by:
I have an excel worsheet and its divided into 7 Columns and 35 rows and i want to design an VB project wich have 8 text boxes & one command button one textbox to put a string value in it to search the excel worksheet by clicking a command button ........ when the needed value is found the vb project fillup the other 7 text boxes with the values of the other rows if there any one can help me with that..plz
9
77444
by: Mahernoz | last post by:
Can i send an email from JavaScript? Is it possible? If yes please the code to send email using javascript...
1
1920
by: crystalgal | last post by:
Help. I am using Excel to enter in daily numbers in worksheet 2. I want to use vb (w/in excel) to create a command button in worksheet 1. I want to enter a date in a cell and click the command button. I then want to use the date i entered into the cell to sum the total of numbers from worksheet 2 by filtering the numbers by the date. I want to enter 7/15/2007. I want to return the total count of all "Reg" jobs somewhere on worksheet 1 ...
12
9059
by: forrestgump | last post by:
I am currently trying to create VBA to send a specified excel sheet to varied email sources. I currently have the code below which sends the attachment in an email to a specified source e.g. mrqwe@hotmails.com, however I want to change this so the address is chosen from a specified cell on a worksheet. I have tried to reference a cell e.g. .sendmail Sheets("sheet3").range("A1"),_ but this does not work. Any ideas anyone? Sub...
2
9864
iBasho
by: iBasho | last post by:
Hi, I am trying to set up a notification email that would come to my email everytime users click on a command button in a form. I am using the DoCmd.SendObject command without actually sending any database objects. Private Sub Command107_Click() On Error GoTo Err_Command107_Click DoCmd.SendObject acSendNoObject, , , "email@email.com", , , "Test", "Email Test", , True Exit_Command107_Click: Exit Sub
4
3824
by: gurufordy | last post by:
Hello. Trying to use the ASP.net user functionality but it keeps failing on me. I have created a login and registration page for my site. When you fill in the registration form it should send a confirmation email with a link to activate the account. Nothing hi-tech here. However, it fails to send the email and provides the following error message: Transaction failed. The server response was: sorry, the sender name and auth login doesn't...
0
9546
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10490
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10030
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9078
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5590
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4146
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.