I'm having trouble saving data to a textfile. I can save the filename but cannot write the data to that file. Can someone help??
Heres an example of the code I have so far:

On Error Resume Next

CommonDialog1.Filter = "All Text Files (*.txt)|*.txt"
CommonDialog1.ShowSave

strOpenFile = CommonDialog1.Filename

Set ts = fso.CreateTextFile(strOpenFile, True)

strData = Text1

ts.Write (strData)
ts.Close