#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Scorecard

I was wondering if someone could help me here. I want to use EXCEL to create a scorecard with up to 5 players. The values to be entered are set on command buttons when I click on them. The values (50,100,250...) will be the total of a roll of dice in a game. Each button will have a value on them and when clicked, add that value to the score box for that player.
1. My problem is: how do I set the value of the button.
2. Get the button value to the player's score box.
3. be able to click the command button more than once to add the score (hit the "100" button 2 times to get "200")
I plan to use this for my Ipaq when we play on the road.
Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Scorecard

I used a combobox to pick the players and command buttons to enter the score. Cells A1:C1 contained Player #s (1,2,3). B1:b3 was player names. C1:C3 was score. For the combobox, the following properties we assigned as follows:
BoundColumn = 1
ColumnCount = 2
ColumnWidths = 0
ListFillRange = Sheet1!A1:B3

and the code for the controls:

Dim Player As Integer

Private Sub ComboBox1_Change()
Player = ComboBox1.Value
End Sub

Sub Add_50()
With Cells(Player, 3)
.Value = .Value + 50
End With
End Sub

Add_100 and others would look exactly the same, just change the .Value + 50 part.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Scorecard

Make sure you select the player first, so as to assign a number to the Player variable. Also, you can abstract the points buttons somewhat with this:

Sub AddNum()
Dim NumToAdd As Integer
Select Case Application.Caller
Case "Button 1": NumToAdd = 50
Case "Button 2": NumToAdd = 100
End Select
With Cells(Player, 3)
.Value = .Value + NumToAdd
End With
End Sub
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Scorecard

Thank you and what you wrote tell me that I have so much to learn. I can see where I need to place the code you wrote, and have made some progress. but..
Do the command buttons go in the Control box?
How are the Player-Name-Score cells linked to the control box?

My end goal is to transfer this spreadsheet to my ipaq PDA to keep a running score.
PS. How long did it take you to learn all of this? I am way impressed as I am self taught.

Thanks again, I will try working on figuring it out. Happy 4th of July

"Marcotte A" wrote:

Make sure you select the player first, so as to assign a number to the Player variable. Also, you can abstract the points buttons somewhat with this:

Sub AddNum()
Dim NumToAdd As Integer
Select Case Application.Caller
Case "Button 1": NumToAdd = 50
Case "Button 2": NumToAdd = 100
End Select
With Cells(Player, 3)
.Value = .Value + NumToAdd
End With
End Sub

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tennis Scorecard Help airolg Excel Worksheet Functions 1 May 24th 10 03:42 AM
scorecard Shweta Srivastava[_2_] New Users to Excel 2 May 15th 09 07:11 AM
Supplier scorecard Vince Excel Discussion (Misc queries) 0 May 24th 07 11:48 PM
golf scorecard enyaw Excel Discussion (Misc queries) 1 April 18th 07 04:47 PM
ScoreCard Mat Excel Programming 2 February 4th 04 12:01 PM


All times are GMT +1. The time now is 08:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"