Welcome to Dream.In.Code
Become a VB Expert!

Join 149,478 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,703 people online right now. Registration is fast and FREE... Join Now!




Treadmill program important!

 
Closed TopicStart new topic

Treadmill program important!, calculate the miles per hour pace (minutes:seconds)

Phantom_of_the_opera
1 May, 2007 - 06:12 PM
Post #1

New D.I.C Head
*

Joined: 13 Nov, 2006
Posts: 43


My Contributions
xzd

This post has been edited by Phantom_of_the_opera: 3 May, 2007 - 10:29 AM
User is offlineProfile CardPM
+Quote Post

Jayman
RE: Treadmill Program Important!
1 May, 2007 - 09:17 PM
Post #2

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 7,302



Thanked: 66 times
Dream Kudos: 500
Expert In: Everything

My Contributions
To use an InputBox and store the input you must keep in mind that the InputBox will always return a String value. So you will need to convert the String into the appropriate data type and store that value in your Numeric variable.

I didn't include a Try/Catch around the actual conversion, but I would highly recommend that you do just that. This is to avoid any issues if the user should enter a character other than a number.

Another important note, ALL Functions return a value and typically are called in the same manner, so that the value returned is stored directly into a variable or used in some type of output, like a MessageBox.
Example:
CODE

Dim myVar As String
Dim myNum As Double

myVar = InputBox("Enter a number")
myNum = CDbl(myVar)


Does this answer your question?
User is online!Profile CardPM
+Quote Post

Phantom_of_the_opera
RE: Treadmill Program Important!
2 May, 2007 - 11:10 AM
Post #3

New D.I.C Head
*

Joined: 13 Nov, 2006
Posts: 43


My Contributions
zx

This post has been edited by Phantom_of_the_opera: 3 May, 2007 - 10:29 AM
User is offlineProfile CardPM
+Quote Post

Closed TopicStart new topic
Time is now: 1/7/09 03:26PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month