Hi all,
I've been searching the internet for a couple of days and haven't quite found what I'm after and wondering if someone can help me out. My vba coding is horrendous and self taught over the last week.
What I've got is 15 different buttons what I want it to do is onclick for button1 which has a caption of A+ is to enter it in cell B7 then move on to select B8 then if I click on Button8 that has a caption of C to add that into cell b8. hopefully that makes sense. I've got a screenshot below with what the form looks like and sample code what I've done so far that is kinda doing what I want. What I want to achieve is hopefully only have 1 macro instead of 15 difference codes for each button.
You can also see with my current code is that it will only move to B7 and B8
Thank you in advanced.
I've been searching the internet for a couple of days and haven't quite found what I'm after and wondering if someone can help me out. My vba coding is horrendous and self taught over the last week.
What I've got is 15 different buttons what I want it to do is onclick for button1 which has a caption of A+ is to enter it in cell B7 then move on to select B8 then if I click on Button8 that has a caption of C to add that into cell b8. hopefully that makes sense. I've got a screenshot below with what the form looks like and sample code what I've done so far that is kinda doing what I want. What I want to achieve is hopefully only have 1 macro instead of 15 difference codes for each button.
You can also see with my current code is that it will only move to B7 and B8
VBA Code:
Sub A_Plus()
Range("B7").Select
If IsEmpty(ActiveCell) Then
ActiveCell.Formula = "A+"
Else
ActiveCell.Offset(1, 0).Select
ActiveCell.Formula = "A+"
End If
End Sub
Thank you in advanced.