Monday, June 20, 2005

 

Rule 5: Debug On / Debug Off

Create a debug on and debug off macro.

This macro hides all the sheets the user doesn't need to see, or vice versa.

It can also turn protection on and off if that is being used.

If there is special formating on some sheet, it may put the grid lines back, enable stasus bars etc that are needed for development.

Here is an example.


Option Explicit

Public Sub Display(b As Boolean)
Sheets("Parameters").Visible = b
Sheets("CurrentData").Visible = b
Sheets("DeltaData").Visible = b
Sheets("AbsoluteData").Visible = b
End Sub

Public Sub Test()
Display (True)
End Sub

Public Sub Prod()
Display (False)
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub

Comments: Post a Comment





<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]