|
-
Aug 11th, 2012, 05:58 PM
#1
Thread Starter
New Member
HELP! with VB 6.5 project I was assigned for work and I haven't done VB since 2002 UG
No lol's please ha...
I'm a financial services rep with a minor in Computer Science so I got assigned the VB task of creating a new lead to app program to make our biz flow more efficient...
Unfortunately, I haven't used my CS skills since college graduation in 2002 so it was a lot of "on the job learning" on my own...
I came up with exactly what the boss wanted for the interface for the telemarketers... I can even have an email shot off to the underwriter upon the "submit button" command.
What I am having trouble with is including all of the info entered into the fields in the email to the underwriter... I tried to do a screenshot to make it easier on myself but it hasn't worked...
Any thoughts? Here is the interface and the code I employed to attach the screenshot to the emails but it doesn't seem to work . If a screenshot attachment is impossible in 6.5 I guess I can just attach field by field.
The other tweaks I wanted to include was to make sure that all fields were competed prior to the "submit" button working and having the currency and numeric boxes stuck as just that... rather than letting the text boxes be a free-for-all for whatever they feel like entering. I wanted to format the appropriate boxes for rates, numeric values, currency, etc but it's been 10 years and I can't remember???
Any help would be greatly appreciated!!! Thanks!
----------
Private timber As New Timer
Set oWordBasic = CreateObject("Word.Basic")
oWordBasic.SendKeys "%{prtsc}"
timber.Interval = 2000
Shell ("mspaint.exe")
SendKeys ("^n")
SendKeys ("^v")
SendKeys ("^s")
SendKeys "{ENTER}"
-
Aug 11th, 2012, 07:05 PM
#2
Member
Re: HELP! with VB 6.5 project I was assigned for work and I haven't done VB since 200
I dont completley understand your question.
You can set each textbox or control with restriction.
For example you can say that a textbox can only contain numbers or letters or whatever you name it.
If you want to be able to email this you can do that.
One way is making a screenshot which is possible but you can also put each value in the body
I can help but please tell me if this is what you need
Pieter
-
Aug 11th, 2012, 07:18 PM
#3
Thread Starter
New Member
Re: HELP! with VB 6.5 project I was assigned for work and I haven't done VB since 200
thank you Pieter! My goal is to make the textboxes that are only supposed to contain numbers only allow numbers... Also is there a way to make a text box only allow a currency (dollar) value or is it just numbers or letters?
Also, I need to make sure that each text box has a value selected and all of the option button groups have been utilized... I grouped each option button group together so the loan officer can only pick one option so I believe those are working ok.
The main things left to do are to make sure I have the numeric text boxes set correctly to "numeric only", the currency text boxes set to "currency only", and that the entire form is filled out completely (meaning no empty values in any text boxes when they click the submit button).
After that, I need to complete a final screenshot of the form and attach it to an email that will email the attachment to three different recipients.
If I can make all that happen, I am good to go! Thank you for your help!
-
Aug 11th, 2012, 07:30 PM
#4
Thread Starter
New Member
Re: HELP! with VB 6.5 project I was assigned for work and I haven't done VB since 200
Private Sub Image1_Click()
End Sub
Private Sub CommandButton1_Click()
' Email Message Details
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Ryan VanSciver just converted a Lead to App!!!"
objMessage.From = "[email protected]"
objMessage.To = "[email protected]"
objMessage.AddAttachment "C:\Documents and Settings\PUFF\Desktop\LeadApp.bmp"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Set objConfig = CreateObject("cdo.configuration")
Set Flds = objConfig.Fields
schema = "http://schemas.microsoft.com/cdo/configuration/"
Flds.Item(schema & "sendusing") = 2
Flds.Item(schema & "smtpserver") = "smtp.gmail.com"
Flds.Item(schema & "smtpserverport") = 465
Flds.Item(schema & "smtpauthenticate") = 1
Flds.Item(schema & "sendusername") = "[email protected]" 'username and password changed for security
Flds.Item(schema & "sendpassword") = "hh"
Flds.Item(schema & "smtpusessl") = 1
Flds.Update
Set objMessage.Configuration = objConfig
objMessage.Send
Set objMessage = Nothing
End Sub
Private Sub Label1_Click()
End Sub
Private Sub Label2_Click()
End Sub
Private Sub Label22_Click()
End Sub
Private Sub Label23_Click()
End Sub
Private Sub Label8_Click()
End Sub
Private Sub Label9_Click()
End Sub
Private Sub OptionButton1_Click()
End Sub
Private Sub ListBox1_Click()
End Sub
Private Sub OptionButton10_Click()
End Sub
Private Sub OptionButton11_Click()
End Sub
Private Sub OptionButton16_Click()
End Sub
Private Sub OptionButton18_Click()
End Sub
Private Sub OptionButton19_Click()
End Sub
Private Sub OptionButton24_Click()
End Sub
Private Sub OptionButton4_Click()
End Sub
Private Sub OptionButton7_Click()
End Sub
Private Sub OptionButton8_Click()
End Sub
Private Sub OptionButton9_Click()
End Sub
Private Sub RateBox_Change()
End Sub
Private Sub SingleFamilyHome_Click()
End Sub
Private Sub SOURCE_Click()
End Sub
Private Sub TextBox10_Change()
End Sub
Private Sub TextBox37_Change()
End Sub
Private Sub TITLE_Click()
End Sub
Private Sub UserForm_Click()
End Sub
that's it! I just need the numeric text boxes to be #s only and I need to figure out a way to attach a screenshot of the form... right now its just set up to email a dummy bitmap file...
-
Aug 11th, 2012, 08:25 PM
#5
Member
Re: HELP! with VB 6.5 project I was assigned for work and I haven't done VB since 200
Hi,
Here is some code to Check if is numeric or is containig letter only and if is not empty and if checkbox or radio button has been used.
If Not IsNumeric(textbox1.text) Then
msgbox("Please Enter numbers only!", MsgBoxStyle.Information)
Exit Sub
End If
If IsNumeric(textbox1.text) Then
msgbox("Please Enter letters only!", MsgBoxStyle.Information)
Exit Sub
End If
If textbox1.text = "" then
msgbox("you can not leave this field blanc", MsgBoxStyle.Information)
Exit Sub
End if
If CheckBox1.Checked = False And CheckBox2.Checked = False And CheckBox3.Checked = False And CheckBox4.Checked = False And CheckBox5.Checked = False Then
MsgBox("Please select one", MsgBoxStyle.Information)
Exit Sub
End If
You will have to do these tings for each control on the form
I will do the screen shot a little later for you
-
Aug 11th, 2012, 08:29 PM
#6
Thread Starter
New Member
Re: HELP! with VB 6.5 project I was assigned for work and I haven't done VB since 200
Thanks Pieter!!! I really appreciate it man... I'll put your name up on the form with mine when it goes out to corporate!
You're the man!
-
Aug 11th, 2012, 10:48 PM
#7
Member
Re: HELP! with VB 6.5 project I was assigned for work and I haven't done VB since 200
VB Code:
Code:
Dim graph As Graphics = Nothing Try
Dim frmleft As System.Drawing.Point = Me.Bounds.Location
Dim bmp As New Bitmap(Me.Bounds.Width + 8, Me.Bounds.Height + 8)
graph = Graphics.FromImage(bmp)
Dim screeny As Integer = frmleft.Y
graph.CopyFromScreen(screenx - 5, screeny - 5, 0, 0, bmp.Size)
' Save the Screenshot to a file
bmp.Save("C:\temp.png")
bmp.Dispose()
graph.Dispose()
You may change the path of the saving file path.
After you save the screen shot you can put this file as an attachment to the email.
Pieter
-
Aug 12th, 2012, 10:23 AM
#8
Thread Starter
New Member
Re: HELP! with VB 6.5 project I was assigned for work and I haven't done VB since 200
Thanks Pieter!!! Putting it together now!
-
Aug 12th, 2012, 11:40 AM
#9
Re: HELP! with VB 6.5 project I was assigned for work and I haven't done VB since 200
What is VB 6.5? VB went from VB6 SP6 to VB .Net over 10+ years ago. Is this a VB6 or a VB .Net application? Your code looks like VB6. If so this is the wrong forum.
-
Aug 12th, 2012, 12:09 PM
#10
Thread Starter
New Member
Re: HELP! with VB 6.5 project I was assigned for work and I haven't done VB since 200
 Originally Posted by wes4dbt
What is VB 6.5? VB went from VB6 SP6 to VB .Net over 10+ years ago. Is this a VB6 or a VB .Net application? Your code looks like VB6. If so this is the wrong forum.
When I check the system it says Visual Basic 6.5 Copyright 1986 - 2006 Microsoft... I'm running it through Microsoft Office 2007???
-
Aug 12th, 2012, 12:24 PM
#11
Re: HELP! with VB 6.5 project I was assigned for work and I haven't done VB since 200
that is Visual Basic for Applications (VBA) + not vb.net.
try the Office Development forum:
http://www.vbforums.com/forumdisplay...ce-Development
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Aug 12th, 2012, 12:26 PM
#12
Thread Starter
New Member
Re: HELP! with VB 6.5 project I was assigned for work and I haven't done VB since 200
 Originally Posted by .paul.
Will Pieter's code above work with my project or is that .net code?
-
Aug 12th, 2012, 01:23 PM
#13
Thread Starter
New Member
Re: HELP! with VB 6.5 project I was assigned for work and I haven't done VB since 200
I started a new thread here... is this the correct place?
http://www.vbforums.com/showthread.p...27#post4214827
Thank you!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|