I have a macro that I run several times over and over. It's an import of data macro. Part of this code is a unhide/hide rows to hide the rows not being used. The unhide code runs at the begining, the hide runs at the end after the data has been imported. Because it deals with multiple sheets it takes a long time to run and I don't need to run the unhide/hide part after it has run the first time.
The macro runs from a custom toolbar button, so 2 macros are not a viable solution. I'm thinking maybe checking if any rows are hidden and if true bypass that part., but I'm not sure what the syntax would be or the structure to apply to the begining and the end of the code.
Any suggestions would be appreciated.
Do Some Stuff
The macro runs from a custom toolbar button, so 2 macros are not a viable solution. I'm thinking maybe checking if any rows are hidden and if true bypass that part., but I'm not sure what the syntax would be or the structure to apply to the begining and the end of the code.
Any suggestions would be appreciated.
VBA Code:
Application.DisplayAlerts = False
UnhideAll
Application.EnableEvents = False
Dim path As String
path = ThisWorkbook.path
Application.ScreenUpdating = False
Do Some Stuff
VBA Code:
Application.EnableEvents = True
HideAll