Results 1 to 6 of 6

Linking command buttons to option buttons

Threaded View

  1. #1
    Registered User
    Join Date
    02-13-2012
    Location
    Windhoek
    MS-Off Ver
    Excel 2007
    Posts
    3

    Linking command buttons to option buttons

    Hi all , I am completely new to VB so please be patient. I am trying to make a simplified cricket scoring sheet in Excel 2007 that fits all the functions on one spreadsheet page. I have created command buttons that each represent a possible scoring entry in cricket i.e one button for a single run , one for 2 runs , one for 6 runs and so on. I have created a list of batsman names on the left and one for bowler names on the right of my spreadsheet. The theory works as follows : When I select a batsman's name with the option button on the left and the same way a bowler's name on the right , that should mean that that bowler is bowling to that batsman , and all entries should be made next to that batsman and bowler's names. The idea is to tell the spreadsheet next to which name to make entries as , they change all the time as the batsman rotate ends and overs complete.

    I have used this entry to get the numbers to tick over when a command button is pressed :

    This button represents a single run scored and one ball bowled.

    Private Sub CommandButton1_Click()
                mycount = Range("j19,k19,o19") + 1
                Range("j19,k19,o19") = mycount
                mycount = Range("p19") + 0.1
                Range("p19") = mycount
    As you can see this command changes the numbers in a specific range of cells and not dependent upon the specific option button that is ticked next to a name.(See the attached file) . Any ideas on how I can fix this?
    Attached Files Attached Files
    Last edited by sealtite01; 02-20-2012 at 12:44 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1