473,322 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Understanding a code -vb 2005

I'm using VB2005 and am trying to make the text of 2 textboxes send to my email when the user clicks on a button below. I found this code online but I am not sure about the objMessage part and the entire first line.

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Subject"
objMessage.Sender = "EmailAddress@Domain.com"
objMessage.To = "EmailAddress@Domain.com"
objMessage.TextBody = "Main Message"
objMessage.Send

Thank you very much,

Frank
Sep 12 '07 #1
1 1088
kadghar
1,295 Expert 1GB
I'm using VB2005 and am trying to make the text of 2 textboxes send to my email when the user clicks on a button below. I found this code online but I am not sure about the objMessage part and the entire first line.

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Subject"
objMessage.Sender = "EmailAddress@Domain.com"
objMessage.To = "EmailAddress@Domain.com"
objMessage.TextBody = "Main Message"
objMessage.Send

Thank you very much,

Frank
what you're doing is creating an object with a CDO message in it, then you're changing some properties, like subject or sender, and then you're performing an action: sending it

you can use a text box to asign this properties, lets say you have the Subject in textbox1:

objmessage.subject = textbox1.text

im not sure if this code will work fine if you dont have asp.net but there is a free version, so dont worry about it.
Sep 12 '07 #2

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

Similar topics

7
by: Bsedigh_79 | last post by:
hi everybody. I'am a C# programmer and for one of my applications i searched web for a piece of code and finally i found it but in PHP. it was easy to understand the logic but i still have a...
7
by: CheGueVerra | last post by:
First of all Hello all you css freak. geeks and gurus. I just started using css for some web pages I had to do at work and I'im testing some stuff at home to understand more. Now, I wanted to...
30
by: Cowboy \(Gregory A. Beamer\) | last post by:
There seems to be a lot of confusion on the versions of Visual Studio 2005. My latest blog entry covers the different versions: Main URL:...
26
by: Bail | last post by:
I will have a exam on the oncoming friday, my professor told us that it will base upon this program. i am having troubles understanding this program, for example what if i want to add all the...
11
by: Leon | last post by:
Are dataset automatically stored in memory? Does the dispose() method automatically dispose of the dataset in the code below? Do I have to dispose a dataset from memory or does the dataset...
82
by: Eric Lindsay | last post by:
I have been trying to get a better understanding of simple HTML, but I am finding conflicting information is very common. Not only that, even in what seemed elementary and without any possibility...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
1
by: Anonieko | last post by:
Understanding and Using Exceptions (this is a really long post...only read it if you (a) don't know what try/catch is OR (b) actually write catch(Exception ex) or catch{ }) The first thing I...
2
by: MichaelRKramer | last post by:
Hi, I'm new to dotnet 2.0, but I'm an expert in asp 3 or classic asp. Most of my sites are all done with XSLT and ASP which basically writes XMLs. Now I'm reading about the new cool stuff in...
5
by: RolfK | last post by:
Dear ALL, I'm writing some first examples to get a better understanding of XSLT/ XPATH2.0. Please excute this code, any xml input is OK. I'm using saxon. The example runs perfect with ALTOVA,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.