volvomann Active Member Licensed User Longtime User Apr 28, 2012 #1 Hallo. I use this code ro select mann / dame in my app: (Mann = default) My question is if i select dame how can the radiobutten i the list stay i dame next time i open the menylist? Sub butt4mp_Click Dim result As Int Dim myList As List myList.Initialize myList.Add("Mann") myList.Add("Dame") result = InputList(myList, "Velg mann dame",0) If result = 0 Then man= 10 Else If result = 1 Then man = 20 End If If man=10 Then Label7mp.Text= "Mann" ImageView1.Visible=True ImageView2.Visible=False manda =214 Else If man= 20 Then Label7mp.Text= "Dame" ImageView1.Visible=False ImageView2.Visible=True manda =209 End If End Sub
Hallo. I use this code ro select mann / dame in my app: (Mann = default) My question is if i select dame how can the radiobutten i the list stay i dame next time i open the menylist? Sub butt4mp_Click Dim result As Int Dim myList As List myList.Initialize myList.Add("Mann") myList.Add("Dame") result = InputList(myList, "Velg mann dame",0) If result = 0 Then man= 10 Else If result = 1 Then man = 20 End If If man=10 Then Label7mp.Text= "Mann" ImageView1.Visible=True ImageView2.Visible=False manda =214 Else If man= 20 Then Label7mp.Text= "Dame" ImageView1.Visible=False ImageView2.Visible=True manda =209 End If End Sub
margret Well-Known Member Licensed User Longtime User Apr 28, 2012 #2 Move the statement: Code: Copy Dim Result As Int Put this in your Sub Globals and set the default value to 0 so your code is: Code: Copy Sub Globals Dim Result As Int : Result = 0 End Sub Change your code: result = InputList(myList, "Velg mann dame",0) to: Code: Copy result = InputList(myList, "Velg mann dame", result) Last edited: Apr 28, 2012 Upvote 0
Move the statement: Code: Copy Dim Result As Int Put this in your Sub Globals and set the default value to 0 so your code is: Code: Copy Sub Globals Dim Result As Int : Result = 0 End Sub Change your code: result = InputList(myList, "Velg mann dame",0) to: Code: Copy result = InputList(myList, "Velg mann dame", result)
volvomann Active Member Licensed User Longtime User Apr 28, 2012 #3 Thank you Thanl you:sign0142: Upvote 0