Hi,
I currently have a command button to run a macro that hides unwanted rows but want to assign a keyboard short i.e. "Ctrl a". Do I need to edit the following code in order to assign the shortcut or does it involve messing with the properties? I am just starting to learn basic VBE and macros so any help would be much appreciated. Thanks
Private Sub CommandButton1_Click()
Range("C31").Select
Do While ActiveCell.Value <> ""
ActiveCell.Select
If ActiveCell.Value = False Then
ActiveCell.EntireRow.Hidden = True
End If
ActiveCell.Offset(1, 0).Select
Loop
End Sub
I currently have a command button to run a macro that hides unwanted rows but want to assign a keyboard short i.e. "Ctrl a". Do I need to edit the following code in order to assign the shortcut or does it involve messing with the properties? I am just starting to learn basic VBE and macros so any help would be much appreciated. Thanks
Private Sub CommandButton1_Click()
Range("C31").Select
Do While ActiveCell.Value <> ""
ActiveCell.Select
If ActiveCell.Value = False Then
ActiveCell.EntireRow.Hidden = True
End If
ActiveCell.Offset(1, 0).Select
Loop
End Sub