Macro for command buttons and results?

Ashe77

New Member
Joined
May 23, 2013
Messages
13
Hi, I need a macro genius's help please!

I am trying to put together an attendance register for a club I run and we use 5 different types of payment method (just to be difficult). I want to have 5 command buttons that relate to the 5 methods that when pressed for each student one by one will automatically fill in next to each student's name with the relevant method. I did a macro that placed the result in a designated cell reference but that ref stayed the same so each new student would just keep overriding the same cell results.


Does anyone have any ideas?

Many hopeful thanks in advance

Paul
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Posting the routine you did so far might help us help you. We might be able to help modify your current code to simply go to next student. Thanks
 
Upvote 0
Posting the routine you did so far might help us help you. We might be able to help modify your current code to simply go to next student. Thanks

Hi

So, I've been using the below. Connected to a command box labelled "Card £15"

Code:
Sub Button1_Click()

Range("F1").Value = ("Card £15")

End Sub

Paul
 
Upvote 0
Hi

So, I've been using the below. Connected to a command box labelled "Card £15"

Code:
Sub Button1_Click()

Range("F1").Value = ("Card £15")

End Sub

Paul

How about it input into the active row -- this means the user clicks into the cell of the student they want to affect and then presses the button.
Code:
Sub Button1_Click()
cells(activecell.row,"F").Value = ("Card £15")
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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