Is it possible to access local variables via object model?

The expression object could be used for that task. The character '@' has to be put in front of the variable's name. The following VBA sample could be uses as reference:

  Dim UDEDebugger
  set UDEDebugger = Workspace.CoreDebugger (0)
  set UDEExpression = UDEDebugger.Expression( "@RetVal")
  strValue = "Value = " & Hex( UDEExpression.Value) & vbNewLine
  UDEDebugger.ConOutput( strValue)