So I have an excel pricing sheet setup and I have a "add product" button that I want to push that adds several rows and then when I push it again it doesnt work.
I have a counter setup this is my code
Public ProdNum As Integer
Sub AddProd_Click()
If ProdNum = 0 Then ProdNum = 78
Rows(ProdNum & ":" & ProdNum + 10).EntireRow.Hidden = False
Rows(ProdNum + 37 & ":" & ProdNum + 40).EntireRow.Hidden = False
ProdNum = ProdNum + 41
End Sub
Basically I want to
unhide 78:88
unhide 115 to 118
Then push it again and unhide
unhide 119:129
unhide 156:159
push again unhide
160:170
197-200
These numbers are all separated by 41.
I need a delete product button that is connected and deletes all rows that are just added
hide 78:118
hide 119:159
hide 160:200
So I should be able to push add product and then unhide rows..and push delete product and hide series of rows just added, if I add two products the delete product should delete the one that was just added so I am hoping the variable ProdNum can be manipulated by both macros to compliment each other and stay current
Thanks for your help guys
Bookmarks