Please follow the MicroStation Programming forum best practices.
Identify Your Programming Language
It looks like you're writing MicroStation VBA and calling an MDL function using GetCExpressionValue?
Code Syntax Highlighting
When you post code, use the Forum advanced editor's syntax highlighting tool. That's the icon that resembles a pencil:
Why call MDL when VBA includes measurement functions?