Don't let the title confuse you.
What I have is a Table that has four Col with four Rows.
Each Col has one Cell that is a constant as do the Rows which corresponds with
the Col all other Cell in Col/Row are varibels.
Each Cell in one Col must equal or less then the constant or move on to the next
Col.
What I have now works great but I have to decipher between which of the four col that I need to use(no big deal to me).
What I would like to do is have PPC put the right Col In my hand without thinking about it.Like putting that information into four TextBox'es on a Form.
This is what I'm operating with now.
What I have is a Table that has four Col with four Rows.
Each Col has one Cell that is a constant as do the Rows which corresponds with
the Col all other Cell in Col/Row are varibels.
Each Cell in one Col must equal or less then the constant or move on to the next
Col.
What I have now works great but I have to decipher between which of the four col that I need to use(no big deal to me).
What I would like to do is have PPC put the right Col In my hand without thinking about it.Like putting that information into four TextBox'es on a Form.
This is what I'm operating with now.
B4X:
Sub ImageButtonGetPercent3_Click
TextBoxPercent100.Text=TextBoxHopper1.Text+TextBox Hopper2.Text+TextBoxHopper3.Text+TextBoxHopper4.Te xt
If TextBoxPercent100.Text=100 Then
Table1.Cell("A",0)=1026
Table1.Cell("B",1)=438
Table1.Cell("C",2)=140
Table1.Cell("D",3)=116
ImageButtonResin3.BringToFront
ImageButtonExitResin.BringToFront
InitializeConfigResin
Else Msgbox("Pecntage Must Equal 100%","",cMsgBoxOK,cMsgBoxHand)
End If
End Sub
Sub InitializeConfigResin
Table1.Cell("A",1)=(Table1.Cell("A",0)*TextBoxHopp er2.Text)/TextBoxHopper1.Text
Table1.Cell("A",2)=(Table1.Cell("A",0)*TextBoxHopp er3.Text)/TextBoxHopper1.Text
Table1.Cell("A",3)=(Table1.Cell("A",0)*TextBoxHopp er4.Text)/TextBoxHopper1.Text
Table1.Cell("B",0)=(Table1.Cell("B",1)*TextBoxHopp er1.Text)/TextBoxHopper2.Text
Table1.Cell("B",2)=(Table1.Cell("B",1)*TextBoxHopp er3.Text)/TextBoxHopper2.Text
Table1.Cell("B",3)=(Table1.Cell("B",1)*TextBoxHopp er4.Text)/TextBoxHopper2.Text
Table1.Cell("C",0)=(Table1.Cell("C",2)*TextBoxHopp er1.Text)/TextBoxHopper3.Text
Table1.Cell("C",1)=(Table1.Cell("C",2)*TextBoxHopp er2.Text)/TextBoxHopper3.Text
Table1.Cell("C",3)=(Table1.Cell("C",2)*TextBoxHopp er4.Text)/TextBoxHopper3.Text
Table1.Cell("D",0)=(Table1.Cell("D",3)*TextBoxHopp er1.Text)/TextBoxHopper4.Text
Table1.Cell("D",1)=(Table1.Cell("D",3)*TextBoxHopp er2.Text)/TextBoxHopper4.Text
Table1.Cell("D",2)=(Table1.Cell("D",3)*TextBoxHopp er3.Text)/TextBoxHopper4.Text
ButtonA2.Text=(Table1.Cell("A",1)/Table1.Cell("B",1))*100
ButtonA3.Text=(Table1.Cell("A",2)/Table1.Cell("C",2))*100
ButtonA4.Text=(Table1.Cell("A",3)/Table1.Cell("D",3))*100
ButtonB1.Text=(Table1.Cell("B",0)/Table1.Cell("A",0))*100
ButtonB3.Text=(Table1.Cell("B",2)/Table1.Cell("C",2))*100
ButtonB4.Text=(Table1.Cell("B",3)/Table1.Cell("D",3))*100
ButtonC1.Text=(Table1.Cell("C",0)/Table1.Cell("A",0))*100
ButtonC2.Text=(Table1.Cell("C",1)/Table1.Cell("B",1))*100
ButtonC4.Text=(Table1.Cell("C",3)/Table1.Cell("D",3))*100
ButtonD1.Text=(Table1.Cell("D",0)/Table1.Cell("A",0))*100
ButtonD2.Text=(Table1.Cell("D",1)/Table1.Cell("B",1))*100
ButtonD3.Text=(Table1.Cell("D",2)/Table1.Cell("C",2))*100
TextBoxSum1.Text=Table1.Cell("A",0)+Table1.Cell("A ",1)+Table1.Cell("A",2)+Table1.Cell("A",3)
TextBoxSum2.Text=Table1.Cell("B",0)+Table1.Cell("B ",1)+Table1.Cell("B",2)+Table1.Cell("B",3)
TextBoxSum3.Text=Table1.Cell("C",0)+Table1.Cell("C ",1)+Table1.Cell("C",2)+Table1.Cell("C",3)
TextBoxSum4.Text=Table1.Cell("D",0)+Table1.Cell("D ",1)+Table1.Cell("D",2)+Table1.Cell("D",3)
InitializeRound
End Sub
Sub InitializeRound
ButtonA2.Text=Round(ButtonA2.Text,0)
ButtonA3.Text=Round(ButtonA3.Text,0)
ButtonA4.Text=Round(ButtonA4.Text,0)
ButtonB1.Text=Round(ButtonB1.Text,0)
ButtonB3.Text=Round(ButtonB3.Text,0)
ButtonB4.Text=Round(ButtonB4.Text,0)
ButtonC1.Text=Round(ButtonC1.Text,0)
ButtonC2.Text=Round(ButtonC2.Text,0)
ButtonC4.Text=Round(ButtonC4.Text,0)
ButtonD1.Text=Round(ButtonD1.Text,0)
ButtonD2.Text=Round(ButtonD2.Text,0)
ButtonD3.Text=Round(ButtonD3.Text,0)
TextBoxSum1.Text=Round(TextBoxSum1.Text,0)
TextBoxSum2.Text=Round(TextBoxSum2.Text,0)
TextBoxSum3.Text=Round(TextBoxSum3.Text,0)
TextBoxSum4.Text=Round(TextBoxSum4.Text,0)
PanelGetResin.BringToFront
Form2.Show
End Sub