|
-
Jul 18th, 2010, 05:23 AM
#1
Thread Starter
Junior Member
[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
Last edited by Imperoto; Jul 18th, 2010 at 05:41 AM.
-
Jul 18th, 2010, 05:32 AM
#2
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
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Jul 18th, 2010, 05:38 AM
#3
Thread Starter
Junior Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|