Typing May Be Good For You

I have written previously about User Defined Types, where I showed what I feel is a good, legitimate use of UDTs, namely the saving of application settings at the start of my procedures, then re-instating them at the end. I have since extended that technique to make it more generic, as follows Public Type ApplicationValues    AppEnableEvents As Boolean    AppScreenUpdating As Boolean    AppDisplayAlerts As Boolean    AppCalculation As XlCalculation End Type Public Function DoSomeStuff() Dim myAppSettings As ApplicationValues     Call AppSettings(State:=”Set”, _                 AppType:=mpAppSettings, _                 AppEvents:=True, _                 AppScreen:=False, _                 AppAlerts:=False, _                 AppCalc:=-1)     On Error GoTo func_error  … main code    func_exit:     Call … Continue reading Typing May Be Good For You