Advertisement
AyanUpadhaya

Convert Kilos to Pound using Sub Procedure VBScript Project

Oct 23rd, 2021
515
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Option Explicit
  2.  
  3. Dim inputWeight
  4. inputWeight = CDbl(InputBox("Enter the weight in Kilos"))
  5.  
  6. Call ConvertWeight(inputWeight)
  7. Call EndScript
  8.  
  9. 'Sub procedure starts
  10. Sub ConvertWeight(Kilos)
  11.     Dim Pounds
  12.     Pounds = 2.205* Kilos
  13.     MsgBox "The weight of " &Kilos &" Kg is equivalent to " &Pounds &"lbs"
  14. ' Sub Procedure ends
  15. End Sub
  16.  
  17.  
  18. Sub EndScript()
  19.     MsgBox "Thank you for using our script"
  20. End Sub
  21.  
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement