Remove this Banner Ad

Visual Basic 2005 Help

  • Thread starter Thread starter giantroo
  • Start date Start date
  • Tagged users Tagged users None

🥰 Love BigFooty? Join now for free.

I'm trying to finish up on my work and i'm almost done but there is one code that i need that i can't figure out.


I have a payment letter that i need to make.


Now i have 2 texts and one label. In the label i have the letter.


Label letter: ...Name.... letter..... how much you owe .... ... amount you owe... You have 7 days to pay


Now in the text boxes i have the name of the customer and the amount. Now i want the name and amount to go into the letter every time i enter a different name and amount.

My current code:


Private
SubbtnStart_Click(ByVal sender Assystem.Object, ByVale As System.EventArgs) Handles[/COLOR btnStart.Click
'Display Letter
lblletter.Text = "name," & vbCrLf & vbCrLf & "Our Records show that you have an overdue payment.This amount equates to amount." & vbCrLf &"Please pay this amount in 7 days from the date you recieve this letter "

These are the text boxes that i have the name and amount in'display heading
txtname.Text = ""
'display payment amount
txtamount.Text = ""


Any suggestions on how i could do it?
 
I am confused. When you enter a new Name and Account, you want the old Name and Account to go in to the label?
 
If I'm understanding what you're looking for..

Change this:

lblletter.Text = "name," & vbCrLf & vbCrLf & "Our Records show that you have an overdue payment.This amount equates to amount." & vbCrLf &"Please pay this amount in 7 days from the date you recieve this letter "

To This:

lblletter.Text = txtname.Text & "," & vbCrLf & vbCrLf & "Our Records show that you have an overdue payment.This amount equates to " & txtamount.Text & "." & vbCrLf & "Please pay this amount in 7 days from the date you recieve this letter. "

I'm not sure if you're looking to learn or just get this one thing done, but you might look into using a Stringbuilder (System.Text namespace).

cheers,
Ad
 

Remove this Banner Ad

Remove this Banner Ad

🥰 Love BigFooty? Join now for free.

Back
Top Bottom