devesh67 Level: Trainee
 Registered: 10-01-2006 Posts: 1
|
Can't explain why! Please Help!ActiveX Component Can't Create object
Hi All, I'm posting a ques for the 1st time.
I have a strange problem:
I developed an import program and it works fine on my pc. But on the testers pc it doesn't. There is a functionaly called process which creates a late bound filesystemobject. When the process button is clicked the tester gets error 429.
More strange is that it worked once( when i late bound the dll and built a new install) But afterwards I was required to make some modifications and built another install. But the same error occurs now.
I'm shipping the scrrun. Everything works fine on my pc, it's just that the tester is getting the error.
Please advise!
The process functionality code is:
Private Sub cmdProcess_Click()
If iRunValidate = 1 Then
If ValidateFields = False Then
Exit Sub
End If
'Disable Buttons
cmdValidate.Enabled = False
cmdClose.Enabled = False
cmdCancel.Enabled = False
cmdView.Enabled = False
cmdProcess.Enabled = False
cmdImport.Enabled = False
cmdLog.Enabled = False
cboEr.Enabled = False
Call setMainValues
'Set MousePointer to Hour Glass
Screen.MousePointer = vbHourglass
Call ImportKronosFile(sImportFile)
'Set Mouse Pointer to Normal
Screen.MousePointer = vbDefault
'Set Process Flag to True
iRunFlag = 1
'Enable some Buttons
cmdClose.Enabled = True
cmdView.Enabled = True
'Set Focus to View Log File Button
cmdView.SetFocus
Else
MsgBox "Validate Process has not been run, Please Run Validate Process", vbExclamation, "Insync "
End If
End Sub
Private Sub ImportKronosFile(sFileName As String)
Dim lngLineCnt As Long
Dim lFileLineCount As Long
'Variable to Read a Line from the file
Dim strLine As String
Dim iPbvalue As Double
'Create Filesystem Object To access Read Import File
Set fs = CreateObject("Scripting.FileSystemObject")
Set tsIn = fs.OpenTextFile(sFileName, 1, False)
'Get the Number Of Line in the File to Synchronize The ProgressBar
lFileLineCount = fLineCnt(sFileName)
'Set Focus on the form
Me.SetFocus
If tsIn.AtEndOfStream Then
Exit Sub
End If
Do Until tsIn.AtEndOfStream
'Start Reading Lines in the File as From the 3rd Line
If lngLineCnt > 1 Then
strLine = tsIn.ReadLine
lngLineCnt = lngLineCnt + 1
If lngLineCnt <= lFileLineCount Then
iPbvalue = (lngLineCnt) / lFileLineCount
End If
If iPbvalue > 0.99 Then
pbProgress.Value = Fix(iPbvalue * 100)
' lblProgress.Caption = Fix(iPbvalue * 100) & "%"
Else
pbProgress.Value = (iPbvalue * 100)
' lblProgress.Caption = Fix(iPbvalue * 100) & "%"
End If
DoEvents
ProcessLine (strLine)
If tsIn.AtEndOfStream = True Then
Exit Do
End If
End If
If lngLineCnt <= 2 Then
strLine = tsIn.ReadLine
lngLineCnt = lngLineCnt + 1
End If
Loop
'Free Memory
Set fs = Nothing
Set tsIn = Nothing
'Notify User that Processing is complete
MsgBox "Processing completed", vbInformation, "Insync"
End Sub
|