Results 1 to 1 of 1
2006-08-16, 20:05 #1
- Join Date
- Feb 2001
- Yilgarn region of Toronto, Ontario
- Thanked 0 Times in 0 Posts
Traps for young players (Word 2000 et al.)
I am in the habit of writing MsgBox calls to display test results.
Here is a case where my habit fails me:
The MsgBox function filters out various non-printing characters and displays to me a beautiful message (see screen snapshot); all looks well.
The true story is revealed by the Debug.print statement, and of course in an apparently corrupt result.
<pre>Public Function strOfficeProductID()
strOfficeProductID = GetRegistryValue(HKEY_LOCAL_MACHINE, "SoftwareMicrosoftOffice9.0RegistrationProduct ID", "")
Here is the debug print, with some of the offending characters removed:
<pre>50106-707-9999993-03601 9 9 9 9 3 - 0 3 6 0 1</pre>
If I've done it right, here's is a screen snapshot of the neater MsgBox result.