ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dump of all variable contents (https://www.excelbanter.com/excel-programming/292037-re-dump-all-variable-contents.html)

Bernie Deitrick

Dump of all variable contents
 
dan,

No, you can't get all your variables. The normal way to determine what goes
wrong is to use something like

Sub ErrorExample()
Dim strError As String

On Error GoTo MyError
'Typically, strError is set before each section
'If an error occurs, strError is returned

strError = "Error in Counting Toes"
'Count your toes code here
......

strError = "Error in Examining Bellybutton"
'Examine Bellybutton code here
.....

Exit Sub

myError:
Msgbox strError

End Sub

HTH,
Bernie
MS Excel MVP

"dan" wrote in message
...
Is there a collection or something I can enumerate to dump the contents of

all variables when an error occurs?

I am sending this project out into the world and I need some way of

determining the current state of things when it blows up.

Thanks





All times are GMT +1. The time now is 02:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com