Howdy:
I have a very simple macro to unprotect a tab, refresh a pivot table on that tab and reprotect the tab:
When I run the macro, I get an Expected End Sub error even though I clearly have an End Sub statement. What am I doing wrong? Thx.![]()
' Macro3 Macro ' Private Sub Button5_Click() ActiveSheet.Unprotect Password:="expenseallocation" ActiveSheet.PivotTables(2).PivotCache.Refresh ActiveSheet.Protect Password:="expenseallocation" End Sub
Bookmarks