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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
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,214,534
Messages
6,120,080
Members
448,943
Latest member
sharmarick

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