Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
lmc.engineering
in reply to: RNDinov8r

Sorry, I realise now you want to lock the user in to answering without the option to back out by closing the form. I've added a rough and ready way to ensure an answer is selected instead of you having the additional four lines.. 

 

Dim ValueList As New List(Of String)({"ROUND", "SQUARE", "SHEET", "PURCHASED" }) ' Add more options here if needed
Dim iPropVal As String

Try
	'See if the iProperty exists currently
	iPropVal = iProperties.Value("Custom", "Form Factor")
Catch ex As Exception
	'It doesn't exists, so create it
	Line1:
	iPropVal = InputListBox("Prompt", ValueList, ValueList.Item(0), Title := "iLogic", ListName := "Form List")
	If iPropVal Is Nothing Then  ' User closed form before selecting option
		MessageBox.Show("Please select a value", "Form List")
		GoTo line1
	End If
	iProperties.Value("Custom", "Form Factor") = iPropVal
End Try