Hi
Thankyou for your support
1) Can you please tell me how do i include several lines in msgbox
Right know I have only one line i want to add two line Pitch Diamater & Radius.
2) How do i bring all the data values in excel sheet1 I know we have to use Dim ws As Worksheet but still not working
3) I want to add another button which quickly clears all the value
Thanks in Advance
MsgBox "Pitch Circumfarance is " & pcirc
Private Sub CommandButton1_Click()
Dim pitch As Variant
Dim teeth As Variant
Dim pcirc As Variant
Dim smotor As Variant
Dim drivm As Variant
Dim revsh As Variant
Dim steprev As Variant
Dim ldis As Variant
Dim perr As Variant
Dim nerr As Variant
Dim dist As Variant
Dim ecal As Variant
Dim nst As Variant
Dim finalst As Variant
smotor = Me.smotor.Value
drivm = Me.drivm.Value
revsh = smotor * drivm
pitch = Me.pitch.Value
teeth = Me.teeth.Value
pcirc = pitch * teeth
steprev = revsh / pcirc
dist = Me.dist.Value
perr = Me.perr.Value
nerr = Me.nerr.Value
ldis = dist * steprev
ecal = steprev * perr
nst = ldis - ecal
finalst = nst / dist
MsgBox "Pitch Circumfarance is " & pcirc
MsgBox revsh
MsgBox steprev
MsgBox finalst
End Sub
Thankyou for your support
1) Can you please tell me how do i include several lines in msgbox
Right know I have only one line i want to add two line Pitch Diamater & Radius.
2) How do i bring all the data values in excel sheet1 I know we have to use Dim ws As Worksheet but still not working
3) I want to add another button which quickly clears all the value
Thanks in Advance
MsgBox "Pitch Circumfarance is " & pcirc
Private Sub CommandButton1_Click()
Dim pitch As Variant
Dim teeth As Variant
Dim pcirc As Variant
Dim smotor As Variant
Dim drivm As Variant
Dim revsh As Variant
Dim steprev As Variant
Dim ldis As Variant
Dim perr As Variant
Dim nerr As Variant
Dim dist As Variant
Dim ecal As Variant
Dim nst As Variant
Dim finalst As Variant
smotor = Me.smotor.Value
drivm = Me.drivm.Value
revsh = smotor * drivm
pitch = Me.pitch.Value
teeth = Me.teeth.Value
pcirc = pitch * teeth
steprev = revsh / pcirc
dist = Me.dist.Value
perr = Me.perr.Value
nerr = Me.nerr.Value
ldis = dist * steprev
ecal = steprev * perr
nst = ldis - ecal
finalst = nst / dist
MsgBox "Pitch Circumfarance is " & pcirc
MsgBox revsh
MsgBox steprev
MsgBox finalst
End Sub