ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   code suggestion (https://www.excelbanter.com/excel-discussion-misc-queries/86920-code-suggestion.html)

sunkosi

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?



Gazzr

code suggestion
 

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


--
Gazzr
------------------------------------------------------------------------
Gazzr's Profile: http://www.excelforum.com/member.php...o&userid=31075
View this thread: http://www.excelforum.com/showthread...hreadid=539077


JLatham

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?




All times are GMT +1. The time now is 08:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com