hi..
I'm new to vb.I'm using vb2010. I have declare values to comboboxes and i want the value to pass on to a function.Here is the code
Private Sub InitialData_Parameter()
Dim M3S As String = "m³/s"
Dim LS As String = "L/s"
Dim M3H As String = "m³/h"
Dim CFM As String = "CFM"
Dim MS As String = "m/s"
Dim FPM As String = "FPM"
Dim PA As String = "Pa"
Dim INWG As String = "inch W.G"
cbiAirFlows.Items.Clear()
cbiAirFlows.Items.Add(M3S)
cbiAirFlows.Items.Add(M3H)
cbiAirFlows.Items.Add(LS)
cbiAirFlows.Items.Add(CFM)
cbiVelocity.Items.Clear()
cbiVelocity.Items.Add(MS)
cbiVelocity.Items.Add(FPM)
cbiPressure.Items.Clear()
cbiPressure.Items.Add(PA)
cbiPressure.Items.Add(INWG)
If cbiAirFlows.SelectedItem.ToString = M3S Then
Call AirFlowUnitChange("m³/s")
End If
End Sub
But obviously it cannot work.What syntax that i should use to make it work? and where I should put the code? Please bear with my lack of knowledge in code. Really need help..thanks.
I'm new to vb.I'm using vb2010. I have declare values to comboboxes and i want the value to pass on to a function.Here is the code
Private Sub InitialData_Parameter()
Dim M3S As String = "m³/s"
Dim LS As String = "L/s"
Dim M3H As String = "m³/h"
Dim CFM As String = "CFM"
Dim MS As String = "m/s"
Dim FPM As String = "FPM"
Dim PA As String = "Pa"
Dim INWG As String = "inch W.G"
cbiAirFlows.Items.Clear()
cbiAirFlows.Items.Add(M3S)
cbiAirFlows.Items.Add(M3H)
cbiAirFlows.Items.Add(LS)
cbiAirFlows.Items.Add(CFM)
cbiVelocity.Items.Clear()
cbiVelocity.Items.Add(MS)
cbiVelocity.Items.Add(FPM)
cbiPressure.Items.Clear()
cbiPressure.Items.Add(PA)
cbiPressure.Items.Add(INWG)
If cbiAirFlows.SelectedItem.ToString = M3S Then
Call AirFlowUnitChange("m³/s")
End If
End Sub
But obviously it cannot work.What syntax that i should use to make it work? and where I should put the code? Please bear with my lack of knowledge in code. Really need help..thanks.