Click to See Complete Forum and Search --> : How to display a Real value in Engineering format


Ali Habib
April 13th, 2001, 06:43 AM
How to display a Real value in Engineering format. For example I want to display .00001 as 1E-5.

Secondly which is the best event to validate the input in a text box. I want the validation not to occur in case the user enters cancel. HOw can I acomplish this.

Regards

Ali.

johnpc7
April 13th, 2001, 01:02 PM
Put a textbox and a command button on a form and
code as follows:
[vbcode]

Private Sub Command1_Click()
Dim a As Double

a = 0.00054 'can be any value or variable
Text1 = Format(a, "0.E+0000")

End Sub
[/code]

johnpc7
April 13th, 2001, 01:02 PM
Put a textbox and a command button on a form and
code as follows:
[vbcode]

Private Sub Command1_Click()
Dim a As Double

a = 0.00054 'can be any value or variable
Text1 = Format(a, "0.E+0000")

End Sub
[/code]

johnpc7
April 13th, 2001, 01:03 PM
Put a textbox and a command button on a form and
code as follows:


private Sub Command1_Click()
Dim a as Double

a = 0.00054 'can be any value or variable
Text1 = Format(a, "0.E+0000")

End Sub

johnpc7
April 13th, 2001, 01:03 PM
Put a textbox and a command button on a form and
code as follows:


private Sub Command1_Click()
Dim a as Double

a = 0.00054 'can be any value or variable
Text1 = Format(a, "0.E+0000")

End Sub