PDA

Click to See Complete Forum and Search --> : [RESOLVED] Error message in Crystal 8


jonrmoore
Aug 18th, 2008, 02:11 PM
When I try to use the following crystal statements in my vb6 form, I get an error message:

Run-time error '91':
Object variable or With block variable not set



Report.ExportOptions.DestinationType = crEDTDiskFile
Report.ExportOptions.DiskFileName = "C:\test.txt"



Does anyone know why?

jonrmoore
Aug 18th, 2008, 11:48 PM
There simply is not enough participation in this area.

rasinc
Aug 19th, 2008, 07:43 PM
I did a quick google search and found the same error message in Access, Excel, and VB. Problems indicate exporting, printing in landscape, etc. Mostly the answers dictate setting breakpoints and tracking when the error hits and checking the order of setting commands. eg. for the landscape issue, set the orientation before issuing the print command. I don't know the exact error reason but it usually indicates a problem with code above the line when I have seen it.