I'm currently editing someone else's code, paring a large program down to some small features that I want to be more portable.
In the process, a fairly mundane reference to CommonDialog (the "preferred" Open-File dialog reference) stopped working. It now produces an "object not found" error on the first reference it encounters. The code looks like:
I've searched the web. It looks like comdlg32.ocx must be present... it (still) is. The previous code runs fine on my system, and has no explicit references to comdlg32.ocx, nor to CommonDialog1, except as noted in the code above.Code:'open dialog box to ask for control line report filename (text file) CommonDialog1.DialogTitle = "Control Line Report Filename" 'dialog box title CommonDialog1.Filter = "All Files (*.*)|*.*|CommandFile (*.txt) |*.txt|" 'filename extensions CommonDialog1.FilterIndex = 2 'filename filter to txt (default filename) CommonDialog1.filename = "" 'clear dialog textbox CommonDialog1.CancelError = True 'allow cancel button function CommonDialog1.ShowOpen 'show the dialog box filename = CommonDialog1.filename 'textbox filname for output
I've basically given up and started all over from scratch with the working legacy code, but at any moment whatever I broke before might break again...
Any clues?




Reply With Quote