I found a neat capability in Excel VBA:
Rather than rely on manually adjusting the MsgBox calls which include the Sheet name statically, I was able to dynamigcally look up that value from ActiveSheet.Name.
Now, in Excel VBA, the Sheets show up in the Project tree along with Classes and Modules. (Perhaps Excel sheets are roughly equivalent to Access Forms?)
So is there ActiveForm, ActiveClass, ActiveModule equiv also available from which I could look up the name of those objects?
ActiveForm seems to be hidden at Screen.ActiveForm.Name... (douh!!! Me.Name would have worked for Forms!!!!! :banghead
so perhaps I am onto something... Anyone else with input? TIA!
Code:
Private Sub btnRollCosts_Click()
On Error GoTo Err_btnRollCosts_Click
Call ObjCostedBOM.WalkBOMTree("COST")
Exit_btnRollCosts_Click:
Exit Sub
Err_btnRollCosts_Click:
Call errorhandler_MsgBox([B][COLOR=Blue]"Sheet: " & ActiveSheet.Name & "[/COLOR][/B], Function: btnRollCosts_Click()")
Resume Exit_btnRollCosts_Click
End Sub
Now, in Excel VBA, the Sheets show up in the Project tree along with Classes and Modules. (Perhaps Excel sheets are roughly equivalent to Access Forms?)
So is there ActiveForm, ActiveClass, ActiveModule equiv also available from which I could look up the name of those objects?

ActiveForm seems to be hidden at Screen.ActiveForm.Name... (douh!!! Me.Name would have worked for Forms!!!!! :banghead
