[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 833
  • Last Modified:

Sales Logix ( SLX ) - File Save dialogbox error

Hi,

I was trying to save a file using the file save dialog box by using the
 Set objDialog = CreateObject("SAFRCFileDlg.FileSave"). This worked fine for some time.

 But now suddenly it stopped working and throws the following error
Access violation at address 5D166C93 in module safrcdlg.dll. Read of address 00000000


Anybody know whats going on here?

Regards,
Serhan
0
Turkishsun
Asked:
Turkishsun
  • 3
  • 2
1 Solution
 
RobSampsonCommented:
Sounds a corrupt dll.....have you tried running
regsvr32 safrcdlg.dll

What OS are you running on?

Rob.
0
 
TurkishsunAuthor Commented:
Hi Rob,

Thanks for your reply,
I am using Win XP...

Regards,
Serhan
0
 
RobSampsonCommented:
Did you try running the regsvr32 command?

You might also be able to use something like this instead:

      Set objDialog = CreateObject("UserAccounts.CommonDialog")
      '=> http://blogs.msdn.com/gstemp/archive.../17/74868.aspx 
      objDialog.Filter = "Setup Files|*.com; *.exe; *.msi|Script Files|*.bat; *.cmd; *.vbs; *.vbe"
      objDialog.Flags = &H0200 '<-- multi-select File Open dialog box
      objDialog.FilterIndex = 1
      objDialog.InitialDir = "."
      intResult = objDialog.ShowOpen
        If intResult = 0 Then
           Wscript.Quit
        Else
           setupFile = objDialog.FileName
        End If



Regards,

Rob.
0
 
TurkishsunAuthor Commented:
Thanks for the info but it's still not working I ran the "regsvr32 safrcdlg.dll" but I'm still getting the same error.
The file open dialog is working, The following code is working fine when I execute it through a VBScript file

dim objDialog,intReturn
Set objDialog = CreateObject("SAFRCFileDlg.FileOpen")
intReturn = objDialog.OpenFileOpenDlg

but the following is not working

dim objDialog,intReturn
Set objDialog = CreateObject("SAFRCFileDlg.FileSave")
intReturn = objDialog.OpenFileSaveDlg

any suggestions??



Regards,
Serhan
0
 
RobSampsonCommented:
Hi,

On my Windows XP with SP2 I can use:
Set objDialog = CreateObject("SAFRCFileDlg.FileSave")
objDialog.FileName = "C:\Test.txt"
objDialog.FileType = "Text Document"
intReturn = objDialog.OpenFileSaveDlg
If intReturn Then
      strOutputFile = objDialog.FileName
End If
MsgBox strOutputFile


The version of my c:\windows\system32\safrcdlg.dll is 5.1.2600.2180

Is your version the same?

Rob.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now