LoraExcels
New Member
- Joined
- Dec 10, 2015
- Messages
- 4
I've only just started learning programming in VBA for Excel.2013. I have a sheet with 9 columns and 60 rows. Note that Rows 1-25 consist of 9 columns but B through D are merged. I'm trying to add a command button that will hide the unwanted rows for me. The unwanted rows will be chosen through column D only affecting rows 26 through 50 when the cell reads zero. This is how I want the code to read: If cells D26:D50 equal 0 Then EntireRow.Hidden.
I've tried multiple codes, none of which work because they're too simple and missing objects. I've been receiving a lot of errors 13 and 424.
This is my code:
Sub HideRows_Click()
If ActiveSheet.Range("D26:D50").Value=0 Then EntireRow.Hidden = True
End If
End Sub
I'm going to continue watching VBA tutorials. Any help is appreciated.
I've tried multiple codes, none of which work because they're too simple and missing objects. I've been receiving a lot of errors 13 and 424.
This is my code:
Sub HideRows_Click()
If ActiveSheet.Range("D26:D50").Value=0 Then EntireRow.Hidden = True
End If
End Sub
I'm going to continue watching VBA tutorials. Any help is appreciated.