Hi i just started to use visual basics and i need some help... Im writing this fast so sorry for mistakes!
what i want to do is make a MsgBox appear with Buttons inside of it that i have declared in variables...
I hope people understand me im only a couple of weeks into programming
this is what i have so far... im trying to make a loan calculator... im messing around with the code trying to get used to it so ignore the funny parts...
Dim PriceBorrowed As Single
Dim PeriodOfLoan As Single
Dim LoanAmount As Single
Dim SetLoanButton As String
Const Interest = 7
Dim TenThousand As Single
TenThousand = ("£10000")
Dim FiveThousand As Single
FiveThousand = ("£5000")
Dim ThreeThousand As Single
ThreeThousand = ("£3000")
Dim TwoThousand As Single
TwoThousand = ("£2000")
Dim OneThousand As Single
OneThousand = ("£1000")
Dim FiveYears As String
FiveYears = ("5 Years")
Dim ThreeYears As String
ThreeYears = ("3 Years")
Dim OneYear As String
OneYear = ("1 Year")
SetLoanButton = MsgBox("Choose the amount you wish to borrow", vbOK)
If SetLoanButton = vbOK Then
PriceBorrowed = InputBox("Please enter the amount you want to borrow")
PeriodOfLoan = InputBox("Please enter the period of your loan")
LoanAmount = PriceBorrowed * (1 + Interest / 100) ^ (PeriodOfLoan)
Button3.Text = "Your loan will be £" & LoanAmount
Else
MsgBox("Please use custom Loan Calculator")
End If
End Sub
i need to these as buttons, but i dont know how to make them into buttons...
Dim TenThousand As Single
TenThousand = ("£10000")
Dim FiveThousand As Single
FiveThousand = ("£5000")
Dim ThreeThousand As Single
ThreeThousand = ("£3000")
Dim TwoThousand As Single
TwoThousand = ("£2000")
Dim OneThousand As Single
OneThousand = ("£1000")
Dim FiveYears As String
FiveYears = ("5 Years")
Dim ThreeYears As String
ThreeYears = ("3 Years")
Dim OneYear As String
OneYear = ("1 Year")
I need to make them appear as buttons inside a MsgBox
I hope u all understand me, if theres a better way, im open to suggestions.
Thanks.
what i want to do is make a MsgBox appear with Buttons inside of it that i have declared in variables...
I hope people understand me im only a couple of weeks into programming
this is what i have so far... im trying to make a loan calculator... im messing around with the code trying to get used to it so ignore the funny parts...
Dim PriceBorrowed As Single
Dim PeriodOfLoan As Single
Dim LoanAmount As Single
Dim SetLoanButton As String
Const Interest = 7
Dim TenThousand As Single
TenThousand = ("£10000")
Dim FiveThousand As Single
FiveThousand = ("£5000")
Dim ThreeThousand As Single
ThreeThousand = ("£3000")
Dim TwoThousand As Single
TwoThousand = ("£2000")
Dim OneThousand As Single
OneThousand = ("£1000")
Dim FiveYears As String
FiveYears = ("5 Years")
Dim ThreeYears As String
ThreeYears = ("3 Years")
Dim OneYear As String
OneYear = ("1 Year")
SetLoanButton = MsgBox("Choose the amount you wish to borrow", vbOK)
If SetLoanButton = vbOK Then
PriceBorrowed = InputBox("Please enter the amount you want to borrow")
PeriodOfLoan = InputBox("Please enter the period of your loan")
LoanAmount = PriceBorrowed * (1 + Interest / 100) ^ (PeriodOfLoan)
Button3.Text = "Your loan will be £" & LoanAmount
Else
MsgBox("Please use custom Loan Calculator")
End If
End Sub
i need to these as buttons, but i dont know how to make them into buttons...
Dim TenThousand As Single
TenThousand = ("£10000")
Dim FiveThousand As Single
FiveThousand = ("£5000")
Dim ThreeThousand As Single
ThreeThousand = ("£3000")
Dim TwoThousand As Single
TwoThousand = ("£2000")
Dim OneThousand As Single
OneThousand = ("£1000")
Dim FiveYears As String
FiveYears = ("5 Years")
Dim ThreeYears As String
ThreeYears = ("3 Years")
Dim OneYear As String
OneYear = ("1 Year")
I need to make them appear as buttons inside a MsgBox
I hope u all understand me, if theres a better way, im open to suggestions.
Thanks.