I have obtained the following code from /a/60035293/13075931
Static Function ParseValue(StringValue) As Variant
Dim ParseValueBuffer As Variant
If IsEmpty(ParseValueBuffer) Then
ParseValueBuffer = 1
Application.Run ("'ParseValue " & StringValue & "'")
ParseValue = ParseValueBuffer
ParseValueBuffer = Empty
Else
ParseValueBuffer = StringValue
End If
End Function
Sub TestMe()
MsgBox "First line" & ParseValue("vbcrlf") & "Second line"
MsgBox ParseValue("fmTextAlignCenter") 'Should return "2" (if MSForms is referenced)
MsgBox ParseValue("rgbblue") 'Should return 16711680
End Sub
The above code works great only for Excel.
I need Power Point version of the above code.
The following code line throws Invalid request. Sub or function not defined error when I tried to run the above code in the Power Point Application.
Application.Run ("'ParseValue " & StringValue & "'")
New contributor
George Costanza is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.