[SOLVED] Saving (should be easy)
So, this should be easy, but since I'm not an expert in visual basic, I don't know it, so this is the problem;
Code:
If Not My.Settings.site1 = TextBox2.Text Then
If MsgBox("Save websites?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
My.Settings.site1 = TextBox2.Text
My.Settings.site2 = TextBox3.Text
My.Settings.site3 = TextBox4.Text
My.Settings.site4 = TextBox5.Text
My.Settings.site5 = TextBox6.Text
My.Settings.site6 = TextBox7.Text
My.Settings.site7 = TextBox8.Text
My.Settings.site8 = TextBox9.Text
My.Settings.site9 = TextBox10.Text
My.Settings.site10 = TextBox11.Text
My.Settings.Save()
e.Cancel = False
ElseIf MsgBoxResult.No Then
e.Cancel = True
Me.Dispose()
End If
End If
So it only checks if textbox1 is changed but I want it to check for them all, how can I do this? I've tried a couple of ways but they all give me errors.
Jordy
Re: Saving (should be easy)
you'd just include them all in your if statement. here's an example that checks the first 2 settings:
vb Code:
If Not My.Settings.site1 = TextBox2.Text orelse Not My.Settings.site2 = TextBox3.Text Then
Re: Saving (should be easy)
I was looking for a function like that, I tried 'Or' but that didn't work heheh
Thanks, Paul
+Rep