I'm using the common dialog class module in my program and it works great, except for one thing... The FileName that it returns contains extra characters at the end of the string. A 22 character string becomes 261 characters. The class module uses the Trim function to cut out extra spaces but these extra characters aren't spaces. They're Char(0) (space is Char(32) i think). Am I doing something wrong?
I do this:

Dim CommonDialogAPI as clsOpenSave

Private Sub Command1_Click()
Dim SaveBox as clsOpenSave
Set SaveBox = CommonDialogAPI
more code here...
End Sub

I use the dialog box to allow the user to select an external editor. The external editor path is save to the registry and loaded in FormLoad. It works after it is loaded from the registry but it doesn't work if the user changes it. Apparently, saving to the registry clips out the non-Windows characters. Is there a better way to get rid of Char(0) than repeatedly saving to the registry? Thanks in advance.