This content has been marked as final. Show 2 replies
There definitely seems to be something funky going on with the return from that function. I'm on 11.1.2, Win 7 64-bit / Office 2010 32-bit.
I'm running the following code (the "A4" line is because sometimes, converting to Unicode then back again seemed to produce the correct result) and I don't get the same result every time. Sometimes it works. Declaring the return type as string rather than variant doesn't make any difference.
Reluctant to say 'bug' because I can't even get consistent results, but unless I'm misunderstanding something in the VBA it does look like it.
Sub TestMissing() Dim vtMissing As Variant vtMissing = HypGetSheetOption(ActiveWorkbook.ActiveSheet, 13) Range("A1", "A4").Clear Range("A1") = vtMissing Range("A2") = StrConv(vtMissing, vbUnicode) Range("A3") = StrConv(vtMissing, vbFromUnicode) Range("A4") = StrConv(StrConv(vtMissing, vbUnicode), vbFromUnicode) End Sub
Thanks. Yes I had tried that myself including the use of string vs variant. It's weird you get good results sometimes. I've always gotten bad stuff back.
I also tried seting the value to Missing instead of #Missing in Hyperion-Options thinking maybe the # was causing issues but that didn't seem to matter. In the back of my mind I am thinking maybe the answer may be in knowing exactly the codeset the string is being saved as. I looked but couldn't find anything on that.
BTW, it appears to be all strings acting the same way.
I appreciate your looking. I will continue and if I find the solution, I'll post it.