-
I'm going way out on a limb here by assuming sooooooo much 
[vba]
Private Sub CommandButton1_Click()
'Dim crfeet As Double <- should be the userform textbox name
'Dim crinch As Double <- should be the userform textbox name
'Dim nrfeet As Double <- should be the userform textbox name
'Dim nrinch As Double <- should be the userform textbox name
Dim cfeet As Double
Dim nfeet As Double
Dim fscale As Double
' For Text Box input
cfeet = (Val(UserForm1.crfeet.text) * 12) + Val(UserForm1.crinch.text)
' For Text Box input
nfeet = (Val(UserForm1.nrfeet.text) * 12) + Val(UserForm1.nrinch.text)
fscale = (cfeet / nfeet)
'the below will display the message box with the answer
Dim Msg, Style, Title, Response, MyString
Msg = cstr(fscale ) ' Define message.
Style = vbOK ' Define buttons.
Title = "Scale Factor" ' Define title.
' context.
' Display message.
Response = MsgBox(Msg, Style, Title)
End Sub
[/vba]
It's a start anyway
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