English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have to display a value as a label in visual basic. I have it setup where you enter values in text boxes. I have everything I need to get the answer I just don't know how to display the answer as a label.

2007-04-02 15:19:36 · 5 answers · asked by iverson_575 1 in Computers & Internet Programming & Design

I have to display a value as a label in visual basic. I have it setup where you enter values in text boxes. I have everything I need to get the answer I just don't know how to display the answer as a label. I am also trying to put in the equation

EOQ = Sqrt ( 2 (Annual demand) (Ordering cost) / (Holding cost))

I get an error message when I put the 2 in there. It says, "The expression is not an array or method and cannot have an arrguement list."

2007-04-02 16:13:45 · update #1

5 answers

2007-04-02 15:26:24 · answer #1 · answered by Anonymous · 0 0

Like this:

label1.caption = text1.text

Place this code into the Change event for the textbox control, so when a character is typed, it will automatically update the label caption. You could also use it in a LostFocus event, so after your tab to another control the label would be updated with the textbox contents.

Private Sub Text1_Change()
Label1.Caption = Text1.Text
End Sub

or

Private Sub Text1_LostFocus()
Label1.Caption = Text1.Text
End Sub

2007-04-02 15:58:46 · answer #2 · answered by Anonymous · 0 0

EOQ = Sqrt ( 2 (Annual demand) (Ordering cost) / (Holding cost))

You are missing the * symbol for multiplication and the class name "Math"
EOQ = Math.Sqrt ( 2 * (Annual demand) *(Ordering cost) / (Holding cost))

Remember the hierarchy of math functions and check your use of parentheses

2007-04-02 16:30:38 · answer #3 · answered by MarkG 7 · 0 0

An effecient physique of recommendations to manage the reaction from the buyer enter is to make the main of an If Else fact to make certain the clientele determination: If MsgBox("supply up?", vbOkCancel, "end") = vbOk Then call sell off(frmMain) end If If the reaction is vbCancel, truthfully the guy needs to maintain the appliance strolling, the place case the code to end the appliance is voided.

2016-10-02 02:09:42 · answer #4 · answered by lachermeier 4 · 0 0

label1.caption = text1.text

2007-04-02 15:27:52 · answer #5 · answered by deathjsx 1 · 0 0

fedest.com, questions and answers