User Form

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,843
Office Version
  1. 2010
Platform
  1. Windows
Hi all,
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
I want to modify a user form that I’m using to enter half time and full time football scores.
<o:p> </o:p>
I enter my scores by using Spin Button… so for example if the half time score was 3-2 I’d enter that using Spin Button 1 and 2 seeing my 3 and 2 in Text Boxes 1 and 2… however, if there were no second half goals I then have to enter 3 and 2 using Spin Buttons 3 and 4 to see 3 and 2 in Text Boxes 3 and 4…
<o:p> </o:p>
What I want to know is, can my second half text boxes (3 and 4) = my first half text boxes (1 and 2) and then be amended by the Spin Buttons (3 and 4) IF there are second half goals please?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Right, that looks brilliant thanks... It's just a question of, if with my limited VBA skills I can add it to what I already have.

I will have a go though... later today as I suppose I'd better watch F1 and your lot V that North London lot later today.

Thanks for your time with that. :)
 
Upvote 0
I didn't! I can't get what I need to do right in my head.

Attached is what I already have... Text Box1 and Spin Button1 work together etc... So I add 2 extra Text Boxes (13 & 14) but my head is spinning trying to take your VBA and match it to what I already have...

Yes two good results for the Manchester Teams...

Excel Workbook
ABCDEFGHIJKLM
3
4CurrentNew
5
6HTHT
7
8SB 1Text Box 1Text Box 2SB 2SB 1Text Box 1Text Box 2SB 2
9
10
11FTFT
12
13SB 3Text Box 3Text Box 4SB 4SB 3Text Box 13Text Box 14SB 4
14
15
16Text Box 3Text Box 4
17
18
19
20
Sheet1
 
Upvote 0
I think I have it... Does this look right to you please?

Private Sub TextBox1_Change()
If TextBox3.Value = "" Then
TextBox13.Value = TextBox1.Value
Else
TextBox13.Value = Application.WorksheetFunction.Sum(TextBox1.Value, TextBox3.Value)
End If
End Sub

Private Sub TextBox3_Change()
If TextBox3.Value = "" Then
TextBox13.Value = TextBox1.Value
Else
TextBox13.Value = Application.WorksheetFunction.Sum(TextBox1.Value, TextBox3.Value)
End If
End Sub
Private Sub TextBox2_Change()
If TextBox4.Value = "" Then

TextBox14.Value = TextBox2.Value
Else
TextBox14.Value = Application.WorksheetFunction.Sum(TextBox2.Value, TextBox4.Value)
End If
End Sub

Private Sub TextBox4_Change()
If TextBox14.Value = "" Then
TextBox14.Value = TextBox2.Value
Else
TextBox14.Value = Application.WorksheetFunction.Sum(TextBox2.Value, TextBox4.Value)
End If
End Sub
 
Upvote 0
Hi mate...

I have it all running now, I've done a trial of entering scores BUT, I'm not sure about it...

The problem is finger trouble... On my old system if the HT was 2-0 and the FT 3-0... I'd click one Spin Button twice to enter the 2-0 and the second button three times to get 3-0...

I've noticed with this new system I'm in the habit of doing the above so I now get 2-0 and 5-0 as the second button is already on 2 and I'm the habit of clicking 3 times to enter 3-0.

So I'll need to have a re-think... Thanks for your help, your piece works brilliantly, as I've said finger trouble is now the "problem".
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,286
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top