+ Reply to Thread
Results 1 to 3 of 3

code suggestion

  1. #1
    sunkosi
    Guest

    code suggestion

    I am attempting to assign a function to a command button. Upon a single
    mouse click it will report a preassigned cell value to a target address. The
    application is a freestyle kayak competition judging spreadsheet. The result
    will automate the judging.

    Thoughts?



  2. #2
    Registered User
    Join Date
    02-01-2006
    Posts
    60
    I can help with the assigning a macro to a command button part

    Rightclick the toolbar, select customise, select the commands tab.

    Click on Macro under the "Categories" box. Then select Custom Button from the Commands box.

    Drag the button to the tool bar. Once you have done that right click on the button and select Assign macro. Then select the macro you want to assign and click OK.

    First you will need to design the macro!

    Regards
    Gazzr

  3. #3
    JLatham
    Guest

    RE: code suggestion

    If you want the click of the button to assign a value to the currently
    selected (active) cell, then this code for the button will work:
    Sub Button2_Click()
    ActiveCell.Value = 56
    End Sub

    This would always assign a value of 56 to the active cell when the button is
    clicked.

    If you need it to put a specified value into a particular cell on the
    currently active sheet then use something like this:
    Range("A1").Value = 56

    Then no matter where you are on the sheet, the value 56 would always be
    placed into A1 on the currently active sheet.

    "sunkosi" wrote:

    > I am attempting to assign a function to a command button. Upon a single
    > mouse click it will report a preassigned cell value to a target address. The
    > application is a freestyle kayak competition judging spreadsheet. The result
    > will automate the judging.
    >
    > Thoughts?
    >
    >


+ Reply to Thread

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