Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




VB6 Runtime And OLE Automation...


Hi there, I have just learned about INNO SETUP and have been doing my best at reading online articles and the help documents that INNO provides. I have completed my program, and very suprisingly - the size is huge for what the program actually does. I think it's because of the VB6 Runtime files needed to run as well as a few other .ocx/.dll files required.

Anyways...I have added my code to register the controls needed to run my program without the including the VB6 Runtime files.

I want to have two seperate downloads on my website:
the actual program .zip filethe VB6 Runtime files
Does the user just have to move the files from the VB6 Runtime folder into their System folder for it to actually work?

And one more thing...

I am getting the following error when trying to install my program on another computer on the network:

339:Error in Main. Error Message: Component 'vbalIml6.ocx' or one of its dependencies not correctly registered: a file is missing or invalid

here is the code within my INNO Script:


Code:
Source: vbfilesvbalIml6.ocx; DestDir: {sys}; Attribs: system; Flags: regserver restartreplace sharedfile uninsneveruninstall promptifolder
I have run P&DW with a sample program using just that ocx file, and in the dependencies list shows:

-Test.exe
-VB6 Runtime and OLE Automation
-vbalIml6.ocx

I dont see any other files that the 'vbalIml6.ocx' file depends on...what's the problem here?


I know this is a lot, but I think after this, I will have a good grasp on this great INNO utility. I love learning new things. the more = the better!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Automation At Runtime
Hi.
I'm using VBA in an excel macro and i've created a new userform in runtime. The excel file is then saved under a new name, leaving the original file unharmed. I now want the new excel file to be opened directly to the new userform i've created. How can i insert code into the automatic workbook_open command of the new file (or by some other means??) at runtime? I can't do this at design time since i will be tampering with the original file which i don't want to change.

Thanx,
Amit

Runtime Automation Error
Dear Listers:
I am trying to make an error free instalation
with InstallShield. I use VB 6.0 and some
components. My InstallShield installer works
OK in W95,W98,WME,Windows XP but
in one machine where I have Windows 2000
I keep getting the following error when I
execute my application:
Runtime error '-2147417848(80010108)'
Automation error
The error arise when I try to open the MSCAL
object. I have already verified that the MSCAL.OCX
exist in the system. I have installed and reinstalled
several times but I still get the same error.
I made one more test in another machine that had
Windows 2000 and It worked OK. However,
problem persist in the first machine. Any help
would be greatly appreciated.
Regards,
Roberto

Automation Error In XP Runtime
Hi All,

I have developed an App in VB6 Sp5 on a w2k prof box. It all runs well when installed on a clients machine under w2k.
However when installed on an XP client, all works except when i try to load a form that has the microsoft calendar control on it. I receive the following error :
Run-time error '-2147417848 (80010108)' automation error The object invoked has been disconnected from its clients.

I have looked on the microsoft website, there are plenty of articles relating to 80010108, but none seem to satisfy this problem. Has anyone any pointers to resolving this.

Regards
Bill

Runtime Automation Error
Hi,

I am getting a runtime error:

"Run-time error '-2147467259 (80004005)

I have no idea how to debug this, becasue it is not reproducible all the time. I think it comes when i am trying to access the Microsoft Internet Control SHdocVw but not sure. Do you have any idea?

In general, what is the best practice for capturing and handling these Run-time error in Visual Basic 6.0.

Thanks!

Package And Deployment: VB6 Runtime And OLE Automation?
I went to Package and Deployment and VB6 Runtime and OLE Automation was in the list but It didn't tell you what files to get. I need to know this because I'm using another exe maker and need to know what files to get.

Runtime-error 430: Class Does Not Support Automation.....
I creatred a little app to automatically create a workbook with several worksheets. After creation it adds a module so that a macro is added that runs at runtime. So far so good, i built the app on an XP platform and it runs fine. But when i brought the app/code to work, 2000 Professional, i get this: "Run-time error '430': Class does not support Automation or does not support expected interface." When i migrated the code and program to 2000 i had to change my Project reference from "Microsoft Excel 10.0 Object Library" to "Microsoft Excel 8.0 Object Library". I dont know if this is the problem or not. Any ideas...........? Here is the code that is causing the problem. One last bit of info, If i comment out "Private xlModule as Object" the error stops.

' Excel handle decleration.
Private xlAppHandle As Excel.Application
Private xlWorkBook As Excel.Workbook
Private xlCurrentSheet As Excel.Worksheet
Private xlmodule As Object


'Constants for Excel formatting
Private Const colParamGoup As Integer = 1
Private Const colParamName As Integer = 2
Private Const colExpected As Integer = 3
Private Const colLowerTolerance As Integer = 4
Private Const colUpperTolerance As Integer = 5
Private Const colTestCaseOffset As Integer = 3


Public Sub createSheets(numOptions As Integer, numSettings As Integer, numRigging As Integer)
Dim optPlaceHolder As Integer
Dim setPlaceHolder As Integer
Dim rigPlaceHolder As Integer
Dim sumPlaceHolder As Integer
Dim numSheetsAvailable As Integer
Dim numSheetsNeeeded As Integer
Dim numSheetsToCreate As Integer
Dim testCaseIdentifier As String
Dim xlCurSheetNameStr As String


Set xlAppHandle = New Excel.Application
Set xlWorkBook = xlAppHandle.Workbooks.Add()
Set xlmodule = xlWorkBook.VBProject.VBComponents.Add(1)
numSheetsAvailable = xlWorkBook.Worksheets.Count

numSheetsNeeeded = numOptions + numSettings + numRigging + 1
numSheetsToCreate = numSheetsNeeeded - numSheetsAvailable

For i = 1 To numSheetsToCreate + 3
xlWorkBook.Worksheets.Add After:=xlWorkBook.Worksheets(xlWorkBook.Worksheets.Count)
Set xlCurrentSheet = xlWorkBook.Worksheets(i)
Next

Set xlCurrentSheet = xlWorkBook.Sheets(1)
formatSheets
xlCurrentSheet.Name = "App G-1 (SysId)"


For i = 1 To numOptions
optPlaceHolder = i + 1
Set xlCurrentSheet = xlWorkBook.Sheets(optPlaceHolder)
formatSheets
xlCurrentSheet.Name = "App G-" & i + 1 & " (OptionsTC" & i & ")"
Next

For j = 1 To numSettings
setPlaceHolder = j + optPlaceHolder
Set xlCurrentSheet = xlWorkBook.Sheets(setPlaceHolder)
formatSheets
xlCurrentSheet.Name = "App G-" & j + optPlaceHolder & " (SettingsTC" & j & ")"
Next

For k = 1 To numRigging
rigPlaceHolder = k + setPlaceHolder
Set xlCurrentSheet = xlWorkBook.Sheets(rigPlaceHolder)
formatSheets
xlCurrentSheet.Name = "App G-" & k + setPlaceHolder & " (RiggingTC" & k & ")"
Next

Set xlCurrentSheet = xlWorkBook.Sheets(rigPlaceHolder + 1)
formatSummarySheets numOptions
testCaseIdentifier = "Options"
xlCurrentSheet.Name = "App G-" & rigPlaceHolder + 1 & " (Opt TCs)"
xlCurSheetNameStr = "App G-" & rigPlaceHolder + 1 & " (Opt TCs)"
populateSheets testCaseIdentifier, xlCurSheetNameStr, numOptions, optPlaceHolder

Set xlCurrentSheet = xlWorkBook.Sheets(rigPlaceHolder + 2)
formatSummarySheets numSettings
testCaseIdentifier = "Settings"
xlCurrentSheet.Name = "App G-" & rigPlaceHolder + 2 & " (SettingsTCs)"
xlCurSheetNameStr = "App G-" & rigPlaceHolder + 2 & " (SettingsTCs)"
populateSheets testCaseIdentifier, xlCurSheetNameStr, numSettings, optPlaceHolder

Set xlCurrentSheet = xlWorkBook.Sheets(rigPlaceHolder + 3)
formatSummarySheets numRigging
testCaseIdentifier = "Rigging"
xlCurrentSheet.Name = "App G-" & rigPlaceHolder + 3 & " (RiggingTCs)"
xlCurSheetNameStr = "App G-" & rigPlaceHolder + 3 & " (RiggingTCs)"
populateSheets testCaseIdentifier, xlCurSheetNameStr, numRigging, setPlaceHolder

xlWorkBook.SaveAs destFileString
xlAppHandle.Quit
Set xlWorkBook = Nothing
End Sub

Public Sub populateSheets(testCaseType As String, curShtName As String, numTestCases As Integer, _
testCaseSheetOffset As Integer)
Dim strCode As String

Select Case testCaseType
Case "Options"
For i = 1 To numTestCases
strCode = _
"Sub Options" & i & "()" & vbCr & _
" Sheets(""App G-" & i + 1 & " (OptionsTC" & i & ")"").Select" & vbCr & _
" for j=1 to " & numOfOptionsParameters & vbCr & _
" Range(""A""& j + 1 & """").Select" & vbCr & _
" ActiveCell.FormulaR" & j + 1 & "C" & j + 1 & " = ""='" & curShtName & "'!RC" & vbCr & _
" Range(""B""& j + 1 & """").Select" & vbCr & _
" ActiveCell.FormulaR" & j + 1 & "C" & j + 1 & " = ""='" & curShtName & "'!RC" & vbCr & _
" next" & vbCr & _
"End Sub"
xlmodule.CodeModule.AddFromString strCode
xlAppHandle.Run "Options" & i
Next

Case "Settings"
For i = 1 To numTestCases
strCode = _
"Sub Settings" & i & "()" & vbCr & _
" Sheets(""App G-" & i + testCaseSheetOffset & " (SettingsTC" & i & ")"").Select" & vbCr & _
" for j=1 to " & numOfSettingsParameters & vbCr & _
" Range(""A""& j + 1 & """").Select" & vbCr & _
" ActiveCell.FormulaR" & j + 1 & "C" & j + 1 & " = ""='" & curShtName & "'!RC" & vbCr & _
" Range(""B""& j + 1 & """").Select" & vbCr & _
" ActiveCell.FormulaR" & j + 1 & "C" & j + 1 & " = ""='" & curShtName & "'!RC" & vbCr & _
" next" & vbCr & _
"End Sub"
xlmodule.CodeModule.AddFromString strCode
xlAppHandle.Run "Settings" & i
Next

Case "Rigging"
For i = 1 To numTestCases
strCode = _
"Sub Rigging" & i & "()" & vbCr & _
" Sheets(""App G-" & i + testCaseSheetOffset & " (RiggingTC" & i & ")"").Select" & vbCr & _
" for j=1 to " & numOfRiggingParameters & vbCr & _
" Range(""A""& j + 1 & """").Select" & vbCr & _
" ActiveCell.FormulaR" & j + 1 & "C" & j + 1 & " = ""='" & curShtName & "'!RC" & vbCr & _
" Range(""B""& j + 1 & """").Select" & vbCr & _
" ActiveCell.FormulaR" & j + 1 & "C" & j + 1 & " = ""='" & curShtName & "'!RC" & vbCr & _
" next" & vbCr & _
"End Sub"
xlmodule.CodeModule.AddFromString strCode
xlAppHandle.Run "Rigging" & i
Next

Case Else
End Select
End Sub

Runtime Error '458' , Automation Type Not Supported
Runtime error '458', variable uses an automation type not supported in visual basic.

below is code that works on my windows98 p400 system. this code was working on another person's '98 but, has stopped working after i uninstalled and reinstalled the application today. i have deployed dcom98.exe and included mdac_typ.exe in the deployment in an effort to find the problem.

does anyone know what dependants may be missing?
my deployment includes:
MSEXCL35.DLL, MSSTDFMT.DLL,EXCEL8.OLB,VB5DB.DLL



public Sub ExportToExcel()
Dim sText as string
Dim i as Integer, k as Integer, NoSpaces as Boolean
Dim xlApp as Excel.Application
Dim xlBook as Excel.Workbook
Dim xlSheet as Excel.Worksheet
Dim SelStmt as string
Dim rs as Recordset
Dim FName as string
Dim FileIsThere as Boolean
Dim sTmp as string
'...
set xlApp = new Excel.Application
set xlBook = xlApp.Workbooks.Add(GetQPath & "Template.xlt")
set xlSheet = xlBook.Worksheets(1)
rsQuotes.FindFirst "[QID] = " & CStr(gQID)
CID = CInt(rsQ!CID)
sText = rsQ!QNumber
With xlSheet
'== enter heading:





thank you

Elizabeth

Automation Runtime Error 429 Activex Component Can't Create Object
I am trying to generate an Outlook object. On all the machines only one is having the problem. It is a 98 machine. Here is the code. The error is thrown as soon as I try to instantiate the object on the first line. Also, if I remove the "localhost" parameter, it does not work on a select other machines, but not all of them. Anyone know how I can fix this? Is it a dll problem?


Code:

Public Sub generate_email()
Set objOutlook = CreateObject("Outlook.Application", "localhost")
Set mailRequester = objOutlook.CreateItem(olMailItem)
If strMakeDir <> "" Then
Set oFolderAttachments = oFS.GetFolder(strMakeDir & "").Files
End If

mailRequester.To = strEmailRequester
mailRequester.Subject = "Project Request Number " & strPT_Num & " " & "has been assigned to you."

If strFileUploaded = "y" Or strAdditionalInfo = "y" Then
mailRequester.Body = "Project Request Number: " & strPT_Num & vbCrLf & "Customer: " & strCustomer & vbCrLf & "Submitter: " & strSubmitter & vbCrLf & "Request Date: " & strRequestDate & vbCrLf & "Due Date: " & strDueDate & vbCrLf & "Description: " & strDescription & vbCrLf & "Priority: " & strPriorityTicket & vbCrLf & "Problem Type: " & strPType & vbCrLf & "Files have been uploaded for the project request. Please visit the query page the view and download the files associated with this Project Request"

For Each fileObject In oFolderAttachments
Set oFileAttach = oFS.GetFile(fileObject)
mailRequester.Attachments.Add (oFileAttach)
Next
Else
mailRequester.Body = "Project Request Number: " & strPT_Num & vbCrLf & "Customer: " & strCustomer & vbCrLf & "Submitter: " & strSubmitter & vbCrLf & "Request Date: " & strRequestDate & vbCrLf & "Due Date: " & strDueDate & vbCrLf & "Description: " & strDescription & vbCrLf & "Priority: " & strPriorityTicket & vbCrLf & "Problem Type: " & strPType
End If

mailRequester.Send

End Sub

&"Runtime Error '430' Class Does Not Support Automation Or Does Not Support Expected..
Dear friends,


I am enhancing my company current system in VB. I tried to install the new system in client pc for testing. after succesful installation, when I tried to start to run one of the module after log in, they showed an error message as follows:

"Runtime error '430' class does not support Automation or does not support expected interface"

I found certain solution from website, they suggested to un-register the dll and re-register. between, i never register any dll or exe through regsvr32. For this case, is the dll still is the cause for the error?

If anyone can help me, I am very thankful for that.

Anatasia

Runtime Error -13 (fffffff3) Automation Error
Good night
This is killing me.
I bought a new computer, copied and installed my code and programs (from Win2K to WinXP). When I process my code, everything works fine except for this problem. When the program reach this part of the code :

frmCover.Visible = True
frmCover.Left = 0
frmCover.Top = 0

Do
DoEvents
Loop While TempLoaded = True

It crashes everytime at the DoEvents statement. If I press the Play button again, it will go throughout the loop without problems. The error message is :

Runtime Error -13 (fffffff3)
Automation Error

Anybody has an idea about this problem ?

Many Thanks

Runtime Error 5000,automation Error
hI ,

i have a problem .. i am working with Active Reports and VB .. as a dll, i am calling this dll from ASP , and passing some parameters

the dll works fine on development environment , but on pilot environment it gives the error

Msgbox Runtime error 5000

eventhough there is no msgbox in that dll ...

It also gives

Automation error
The callee (server [not server application]) is not available and disappeared; all connections are invalid.
The call may have executed. and number is -2147418105

In that dll 3 reports do not work and two reports are working .... so it cannot be database error



Please i have been working on this for the last one week ... any idea..
Also what is Runtime error 5000


Sini


Public Sub ActiveReport_ReportStart()
Dim sUDLFile As String
Dim sSQL As String
Dim pklEmployeeId As Long
Dim dtFROM
Dim dtTo
Dim lProvinceID
Dim lMunicipalityId


sUDLFile = "File Name=" & App.Path & "eProcurement.udl"

dtFROM = FormatDateTime(oRequest.Form("txtDateBox1"), vbShortDate)
dtTo = FormatDateTime(oRequest.Form("txtDateBox2"), vbShortDate)
lProvinceID = oRequest.Form("txtProvinceId")
lMunicipalityId = oRequest.Form("txtMunicipalityId")




sSQL = "spEP_Report_AuctionSummary '" & dtFROM & "', '" & dtTo & "'," & lMunicipalityId & "," & lProvinceID & ""


'set ado connector properties
adoControl.ConnectionString = sUDLFile
adoControl.Source = sSQL


End Sub



Public Sub GenerateReport(ByVal lReportId As Integer, iFilterTypeID As Integer)
'ByVal lReportId As Integer, iFilterTypeID As Integer
On Error GoTo ErrHandler
Dim oReportContent As Object
Dim oReportFilter As Object
Dim oReportBytes As Variant
Dim sContentType As String
'Dim iFilterTypeID As Integer
'Dim lReportId As Integer

'iFilterTypeID = 3
'lReportId = 2
'determine what filter/content type to use
Select Case iFilterTypeID
Case 1 'microsoft excel
Set oReportFilter = New ARExportExcel
sContentType = "application/vnd.ms-excel"
Case 2 'Adode Acrobat PDF
Set oReportFilter = New ARExportPDF
sContentType = "application/pdf"
Case 3 'HTML
Set oReportFilter = New HTMLexport
sContentType = "text/html"
Case 4 'TIFF Image
Set oReportFilter = New TIFFExport
sContentType = "image/tiff"
Case 5 'Plain text
Set oReportFilter = New ARExportText
sContentType = "text/plain"
Case 6 'Rich Text Format
Set oReportFilter = New ARExportRTF
sContentType = "application/msword"
Case Else
'no type passed, raise error
Err.Raise 9000, "WebReporting.clsWebReports", "No filter type specified."
End Select

'determine what report to create
Select Case lReportId
Case 1 'awarded
Set oReportContent = New AuctionSummaryRpt
Case 2 'in progress
Set oReportContent = New InProgressRpt
Case 3 'not awarded
Set oReportContent = New notawarded
Case 4 'survey report
Set oReportContent = New SurveyReport
Case Else
'no type passed, raise error
Err.Raise 9001, "WebReporting.clsWebReports", "Report ID not specified or not mapped in case statement."
End Select

'pass request by Reference
oReportContent.setRequest request

'run specified report
oReportContent.Run


'export pages collection to byte array
oReportFilter.ExportStream oReportContent.Pages, oReportBytes


'Write results back to browser
With Response
.Buffer = True
.Expires = 0
.ContentType = sContentType
.BinaryWrite oReportBytes
End With


'clean up objects
Set oReportContent = Nothing
Set oReportFilter = Nothing

End Sub

Runtime Error -2147221504 Automation Error
I have a sproc that I'm calling from vb6 but i get the error in the subject line. My code for calling is as follows:

CODE    With lcmdCommand
        .ActiveConnection = lcnConnection
        .CommandType = adCmdStoredProc
        .CommandText = "cau_CatalogOverride"
        Set lprmParameter = .CreateParameter(, adInteger, adParamInput, _
            , plCatalogID)
        .Parameters.Append lprmParameter
        Set lprmParameter = .CreateParameter(, adInteger, adParamInput, _
            , plEntityID)
        .Parameters.Append lprmParameter
        Set lprmParameter = .CreateParameter(, adInteger, adParamInput, _
            , plServiceTypeID)
        .Parameters.Append lprmParameter
        Set lprmParameter = .CreateParameter(, adInteger, adParamInput, _
            , IIf(piDueDate = tDefault.DueDate, Null, piDueDate))
        .Parameters.Append lprmParameter
        Set lprmParameter = .CreateParameter(, adInteger, adParamInput, , _
            IIf(piDisplayNoNegOnRtn = tDefault.DisplayNoNegOnRtn, Null, piDisplayNoNegOnRtn))
        .Parameters.Append lprmParameter
         Set lprmParameter = .CreateParameter(, adBoolean, adParamInput, , _
            IIf(piAllowNegGrsTaxDue = tDefault.AllowNegGrsTaxDue, Null, piAllowNegGrsTaxDue))
        .Parameters.Append lprmParameter
         Set lprmParameter = .CreateParameter(, adBoolean, adParamInput, , _
            IIf(piAllowNegNetTaxDue = tDefault.AllowNegNetTaxDue, Null, piAllowNegNetTaxDue))
        .Parameters.Append lprmParameter
         Set lprmParameter = .CreateParameter(, adBoolean, adParamInput, , _
            IIf(piAllowTaxCreditsCauseNegNetTaxDue = tDefault.AllowTaxCreditsCauseNegNetTaxDue, Null, piAllowTaxCreditsCauseNegNetTaxDue))
        .Parameters.Append lprmParameter
         Set lprmParameter = .CreateParameter(, adBoolean, adParamInput, , _
            IIf(piAllowPrepayCauseNegNetTaxDue = tDefault.AllowPrepayCauseNegNetTaxDue, Null, piAllowPrepayCauseNegNetTaxDue))
        .Parameters.Append lprmParameter
         Set lprmParameter = .CreateParameter(, adBoolean, adParamInput, , _
            IIf(piAllowVCCauseNegNetTaxDue = tDefault.AllowVCCauseNegNetTaxDue, Null, piAllowVCCauseNegNetTaxDue))
        .Parameters.Append lprmParameter
         Set lprmParameter = .CreateParameter(, adBoolean, adParamInput, , _
            IIf(piApplyGrsTaxToThreshold = tDefault.ApplyGrsTaxToThreshold, Null, piApplyGrsTaxToThreshold))
        .Parameters.Append lprmParameter
        Set lprmParameter = .CreateParameter(, adVarChar, adParamInput, _
            Len(rcUserID), rcUserID)
        .Parameters.Append lprmParameter
        Set lprmParameter = .CreateParameter(, adDBTimeStamp, adParamInput, , _
            Now())
        .Parameters.Append lprmParameter
        Set lprmParameter = .CreateParameter(, adBoolean, adParamInput, , _
            IIf(piDisablePurification = tDefault.DisablePurification, Null, piDisablePurification))
        .Parameters.Append lprmParameter
        Set lprmParameter = .CreateParameter(, adBoolean, adParamInput, , _
            IIf(piDisableWABO = tDefault.DisableWABO, Null, piDisableWABO))
        .Parameters.Append lprmParameter
        Set lprmParameter = .CreateParameter(, adBoolean, adParamInput, , _
            IIf(piApplyCreditstoBasis = tDefault.ApplyCreditstoBasis, Null, piApplyCreditstoBasis))
        .Parameters.Append lprmParameter
         Set lprmParameter = .CreateParameter(, adBoolean, adParamInput, , piMailRulesOverride)
        .Parameters.Append lprmParameter
        .Execute llNumRecsUpdated
    End With

    If llNumRecsUpdated <= 0 Then
        Err.Raise vbObjectError
    End If

Errors----Runtime Error Or Automation Error
Hi

Deke had helped me a lot in solving my query regarding the charts embedding in datareports
but as i had my doubts that what if i install this package on pcs not having office 2000?? as i use the reference of microsoft graph 9.0
during visual installer packaging i get 2 files along with the .exe that are 2 be added in the app folder
that are ado25.tlb and graph.olb . i include both of these still i get errors.

now what can be the probs??
m posting my code also (helped by Deke )

pls let me know

Samir
Skill is successfully walking a tightrope over Niagara Falls. Intelligence is not trying.

RunTime Error -7 Or Automation Error
Good day
I am facing a disturbing problem.
VB 6 is crashing when I am performing a loop to keep a form up front or at different occasions.
I just moved from Win2K to WinXP and I am pretty sure my problem is material.
Anybody has ever faced these kind of problems ?
Should I reinstall VB ?
Many Thanks

Webbrowser Control Automation And Annoying Pop Ups That Make Automation Diffcult.
Hi,

I am using webbrowser control to automate crawling the internet.

I also have 2 dial up connection as backup.

Sometimes my software has to surf internet address that does not exist, like http://fjsldjfdslfjdlsjflsdjflds

In that case, a window pop up and ask whether I want to connect to the internet using one of the dial up connection.

Looks like webbrowser must have thought that because I couldn't access http://sdflsflsjdsfljdslfjlsdf then internet must be down.

This is a night mare for automation. No body is there to say, no, just move on and access crawl the other sites.

Also sometimes I got message saying that some javascript need to be debugged. Setting internet explorer to have high security (disabling javascript) solves this problem. However, sometimes I stumbled upon url that contain pdf, csv, etc. Then another windows pop up telling me that my security setting disallow me to download this kind of file.

Is there a way so that webbrowser control just "move on" when things go wrong rather than displaying stupid windows?

Webbrowser1.silent=true doesn't help. It helps for some but not others.

So how?

MS Word Automation - How To Prevent Automation Server From Closing
I am using MS Word automation to create a measurement report.

After each measurement a template doc is opened, some text in the doc is replaced by the measurement results and finally the doc is saved under a unique filename. Because it takes some time to open the Word app object, it is done only once at the beginning of the program and closed when the program quits.

So far everything works fine. The Problem is, when the user manually open and close MS Word during my VB app is running, the automation server seems also to be closed and a runtime error occurs when accessing the MS Word object ("The remote server machine does not exist or is unavailable").

How can this be avoided? Is there a way to prevent the automation server from beeing manually closed? Or is there a way to assign my VB app 'it's own' instance of MS Word?

VB,WordPerfect In Windows 98. Runtime Error &"Automation Error&"
Hi,

  I am working with Vb and word Perfect. I created an object of word perfect and use the object to open the wordperfect document for updating the bookmarks dynamically. It is working fine in Windows XP OS. If i try the same application in Windows 98 i am getting "Runtime Error : -2147417848 (80010108) Automation Error". It is creating the Object but it is unable to use the created object to open the file.

If anyone has a soultion for this problem do let me know

Thanks in Advance.

Prakash.

Service &amp; WithEvents SHDocVw Automation - &"automation Error&" -2147220990 (80040202)
Hi.
I have a VB app that i run from a service (The app run at winsta0\default).
The app runs under the localsystem account.

In my app i have:
Private WithEvents winShell As SHDocVw.ShellWindows

and then in one of the functions:
set winShell = new SHDocVw.ShellWindows
When it came to that set line, i get this error in a popup dialog:
"automation error" -2147220990 (80040202)

Some points:
1)When i run the app not from the service, everything is working fine
2)When i remove the WithEvents, i do not get that error (but as you can understand it worthless without the Events).
3)When the app is not running under localsystem then everything is ok.

The problem is related to the combination of the app that runs under the system account, automation and the WithEvents keyword.

I tried to make the service interactive by going to the service manager, right click properties, and checking that box - it did not solve it.

Any suggestions?
(the app must stay running from the systemaccount - i can not change it)
I run it on XP pro.

Thanks

Service &amp; WithEvents SHDocVw Automation - &"automation Error&" -2147220990 (80040202)
Hi.
I have a VB app that i run from a service (The app run at winsta0\default).
The app runs under the localsystem account.

In my app i have:
Private WithEvents winShell As SHDocVw.ShellWindows

and then in one of the functions:
set winShell = new SHDocVw.ShellWindows
When it came to that set line, i get this error in a popup dialog:
"automation error" -2147220990 (80040202)

Some points:
1)When i run the app not from the service, everything is working fine
2)When i remove the WithEvents, i do not get that error (but as you can understand it worthless without the Events).
3)When the app is not running under localsystem then everything is ok.

The problem is related to the combination of the app that runs under the system account, automation and the WithEvents keyword.

I tried to make the service interactive by going to the service manager, right click properties, and checking that box - it did not solve it.

Any suggestions?
(the app must stay running from the systemaccount - i can not change it)
I run it on XP pro.

Thanks

&"Microsoft Shell Controls And Automation&" Vs &"Microsoft Scripting Runtime&"
Hi Guys

Just wondering if any of you know the answer to this:

If I add the reference to "Microsoft Shell Controls And Automation" to my project which already contains a reference to "Microsoft Scripting Runtime".

The reference to "Microsoft Shell Controls And Automation" stops the use of the "GetFolder" methiod.

But when I removed the reference to "Microsoft Shell Controls And Automation" and then add it again, it works fine.

It's just weird, wondering if any of you know the reason?

Cheers

VB Automation - How To Check If VB Automation Possible ?
I created a programme that vb automation to autocad and excel.
However my question is if my programme is being used in a computer which dont have either one of autocad or excel. What will happen when i try to contact that software ?

How can I create a query line to ask the computer if its install with autocad or excel?

I worry the programme will hang when i try to execute a command to autocad or excel in the computer which dont have that software.

Thank you.

Runtime Vs. Compiled Runtime?
Hey guys,

Here's my problem. When I'm running my program from within VB5, it doesn't do anything during a messagebox. But when I have it compiled, it'll respond to external devices like the serial port.

Can anyone tell me the differences between running a program from the VB IDE, and running the compiled program? Is there anyway that I can get it to work the same while designing? I can't get any event to happen (timers, etc...) while I have a messagebox up, unless I have the program compiled.

There must be something simple I'm missing.

- Dim A

VB Runtime Has Any Runtime Cost?
Hi all,
I would like to ask if i am developing a VB client program for a company, does that company needs to pay any runtime cost to MicroSoft? how about VB.Net?
Thanks.

Pop Automation
I have searched here and can find many smtp automation threads, but no pop automation threads.

I run a very basic alumni site for my old Military Unit. Somehow, the link got associated with a popular Military alumni site and now I am getting quite a few emails a week. I have a mail form on my site where the members of this unit can fill out their information and it emails this to me along with a subject: alumni_information

I know how to write an app that will automatically create an html page based on a few variables. I even know how to automate ftp'ing this page up to my site using vb.

The part I am having problems with is this. I want to use UNIX mail commands (I think they are called smtp commands) and winsock. I have tried to connect to mail.comcast.net to access my pop server. I cannot get this to work. After I get this to work I need to dot he following:

1) Use commands to get all email.
2) Check if any have this subject.
3) If so, get the message body.
4) save this message body to my hd with date/timestamp used as filename.
5) open this file and parse (I can do this in VB)
6) create the new page based on parsed data (I can do this)
7) ftp page (I can do this)

I found a mail client ocx once that had the source code for a full client. I tried to disect the pop portion of this and have it do what I need, but it was just too involved. I think using the unix commands with winsock is much easier. Can anyone get me started with items 1) through 4) above?

Thank you,
Joe

Help With Automation
I need to write an application that can retrive data from a web site in a saveable format and manipulate the web page controls (Automated login basically)

So how would I be able to have my program populate datafields and interact with controls on a website?

How can I have it select certain datafields and save the information?

Should I Use Ole For Automation??
hi
I am looking for suggestions on which method u guys think might be best for opening Word documents from templates and saving the resulting document in a seperate location using VB6.
If ole automation does any one know where i can find a listing of all the possible commands. ie set objWDApp= CreateObject("Word.Application")
and so on
any help gratefully received
Peadar

API Or Automation ?
Hi friends!
Can I use "GetSaveFileName" API to save an application automatically without clicking the "Save" button in the dialog box?

I want to save MS Wrod document with this API automatically i.e if I run my VB application it will identify MS Word and save and close it.Following is the code.The code is compiling and identifying MS Word , but it doesn't save to the directory even if I click the "Yes" botton.
------------------------------------------------------
Dim OFN As openfilename
Dim WinWnd1 as long
Static i As Integer

If (FindWindow("OpusApp", vbNullString)) <> 0 Then
WinWnd1 = FindWindow("OpusApp", vbNullString)
ShowWindow WinWnd1, SW_SHOWNORMAL

OFN.lStructSize = Len(OFName)
OFN.hwndOwner = WinWnd1
OFN.hInstance = App.hInstance
OFN.lpstrFilter = ".doc" + Chr$(0) + "*.doc" + Chr$(0)
OFN.lpstrFile = "Word" & i & ""
OFN.nMaxFile = 255
OFN.lpstrFileTitle = OFName.lpstrFile
OFN.nMaxFileTitle = 255
OFN.nMaxFileTitle = Len(OFName.lpstrFile)
OFN.lpstrInitialDir = "C:Backup"
OFN.lpstrTitle = "Saving..."
OFN.flags = 0

GetSaveFileName OFN
SendKeys "{ENTER}", True
i = i + 1
End if
----------------------------------------------------
Someone told me that Automation is easy to do it. I tried it, but it gives an error of "Run-time error 224, object required". I have used "OpusApp" as the class to identify the object like follows:-
Dim x As Object
Set x = GetObject("", OpusApp)
x.SaveAs "C:BackupWord1.doc"

Can anyone help me please............

Automation
Can someone tell me what automation means in VBA please? Is that like running in a silent mode?

Edit:
Okay, from what I'm reading it's controlling a program from another program. Like ...

Dim xlApp As Excel.Application
Set xlApp = New Excel.Application

Is that all there is too it? Using the xlApp object in say word would be automationn

IE Automation - Vba
Hello XtremeVBTalk,
There are a couple of things I need to understand for automating IE using a Macro/VBScript.
I am a semi-beginner user of vba codes and I only got as far as the codes below as an exercise for IE automations.
Essentially, I would like to do the following:

1. click on a hyperlink on 1st IE window to open 2nd window
2. click on a couple of buttons on the second IE window, close 2nd IE window and move back to the 1st IE window.

(I understand this involves knowing the "handle" / Names of the windows and being able to switch from each other?)

I would be grateful if anyone can assist me on this, many thanks.

regards,
Ed

Please understand that the below is only an exercise

Code:
Function Search_Google()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")

IE.Navigate "http://www.google.com" 'load web page google.com

While IE.Busy
DoEvents 'wait until IE is done loading page.
Wend

IE.Document.all("q").Value = "what you want to put in text box"
ie.Document.all("btnG").Click
'clicks the button named "btng" which is google's "google search" button

While ie.Busy
DoEvents 'wait until IE is done loading page.
Wend

End Function

Automation
I haven't programmed VB in a year so I've forgotten next to everything. Anyway, I'm just trying to build a small program that would automate the login process of other applications. So for example it would switch to the other application, type a username in the first textbox, tab to the other textbox and type a password, and finally press ENTER.

How would I go about programming this? Any tutorials available?

Automation
hallo,
ich habe probleme mit einem sortieralgorithmus.
Ich arbeite mit einem excel sheet. In diesem excelsheet gibt es nun Zellen die in einer Spalte B absteigend(unsortiert) aufgereit sind.
Bei diesen Zellen gibt es nun eine spezifikation. sie sind eingeteilt in 3 Gruppen A, B und C.
Die Definition der einzelnen Zelle zu einer gruppe steht in der selben reihe allerings in Spalte A.
Ein anderes VB Prog von mir soll jetzt auf diese Zellen zugreifen(was es genau macht ist jetzt nicht so wichtig da es ja eigentlich um die sortierung geht)
Bisher geht das Programm die Zellen von oben nach unten durch. Die Sortierung sollte nun so funktionieren (ähnlich wie ein Filter), dass das Prog von oben nach unten zuerst alle von A durchgeht dann B und dann C
ich habe das sheet so definiert unter einer public cons
Code:
1:
Public Const sheet1 As String = "sheet1"


so greif ich dann darauf zu:
Code:
1:
Worksheets(sheet1).Cells(sheet1_row + test_nr, sheet_col) <> "")

VB Automation -&gt; I.E.
I need to know how I can call an event from VB to IE and then close the web site.

For example: click on SAVE on the Adobe File -> click yes on SAVE -> close the web browser.

Is there anyway I could do it?

A Bit Of Automation??
I am fairly good at program in visual basic. I ain't no guru but I can get around .

For several days now I have been trying to automate tests on several of my web pages with visual basic. I was wondering if anyone could refer me to a web page where they discuss automation with visual basic or maybe if anyone could tell of a good book they read on automation again wiht visual basic?

I have tried programs that were built specifically toward automation like visual test, winrunner and doctor html . These programs are fine if yoru testing desktops but when it comes to playing with applets, javascript, dhtml, flash or even frames in html they leave alot to be desired!

Well thank you very much for your time and help!

Fraggy

OLE, COM Or Automation
I am integrating my application into MSWord and Excel. I need to merge varying user information, decided at run time, into pre-created merge templates. I have managed to do this but it is extremely slow. Does anybody know of a good book or, better still, a quick way to inteface. Also, when I view a, non merge, document it is very quick. However if I want to view a template it takes a long time. I can see that Access is being loaded, and probably data retrieval takes place, which I don't need when just viewing the template. If Word is already loaded, can I use that version rather than load another copy ?

I have tried to find information on this but every, I mean every, example of using the Word Object shows me how to use the spell checker, I don't want to use the spell checker. Help Please.

Thanks, in anticipation

OLE Automation
Since the minimum search criteria is 4 char's, and OLE is only 3, nothing would come back.

This is my dilema.

I have a program "mplayer.exe" - NO not windowsmedia player

and I want to embed that into my form, and pass it a file to play so I can control where it is on the screen, and maybe put a graphic around the video (home made tv skin stuff)

However, I cannot get the mplayer.exe into the form and tell it to play with an ole.activate or ole.setfocus etc.

please help

SQL In Automation
Hi,

I have a database file in CSV format which generates by a SCADA program every 3 minutes.

I want to automate my Ms SQL script to read in the data every few minutes. But not sure how.....

Firstly, do I use Trigger or Stored Procedure to write the script.
and what do I need to do to place the script in automation.

thxs
Jason

IE Automation - Vba
Hello VB Forums,

I have been trying to get some help regarding this topic from other forums they have proven to be very unhelpful.
I shouldnt think this will be too difficult for any experienced programmer so I hope I am able to find some help on this forum.

There are a couple of things I need to understand for automating IE using a Macro/VBScript.
I am a semi-beginner user of vba codes and I only got as far as the codes below as an exercise for IE automations.
Essentially, I would like to do the following:

1. click on a hyperlink on 1st IE window to open 2nd window
2. click on a couple of buttons on the second IE window, close 2nd IE window and move back to the 1st IE window.

(I understand this involves knowing the "handle" / Names of the windows and being able to switch from each other?)

I would be grateful if anyone can assist me on this, many thanks.

regards,
Ed

Please understand that the below is only an exercise


Code:

Sub Search_Google()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")

IE.Navigate "http://www.google.com" 'load web page google.com

While IE.Busy
DoEvents 'wait until IE is done loading page.
Wend

IE.Document.all("q").Value = "what you want to put in text box"
ie.Document.all("btnG").Click
'clicks the button named "btng" which is google's "google search" button

While ie.Busy
DoEvents 'wait until IE is done loading page.
Wend

End Sub

VSS Automation -- Get
I'm just getting started with VB, so please forgive my lack of knowledge. I need to create a tool using VSS automation to perform gets on specific version of VSS files. Would this be possible?

Regarding Automation
Hi,
Is there anyway to automate a flash application using VB?

Thanks
vivek

IE Automation.. DOM
I am automating Internet Explorer using VB in order to download a file. I cannot use the DownloadFile function becuase I have to simulate various button clicks and logins before I can get the link to the proper file. When I finally reach the page, I have to emulate clicking a submit button on a form to get the "real" document I want. The problem is the real document is spawed in a new instance of IE, different from the one I am automating.

How can I "Pickup" automation on an IE instance that was created from an instance I created originally?

Web Automation
i am working on automating populating a web page with values from a database - any suggestions on how to resolve this would be appreciated

=======================================
==== THE PROBLEM:
=======================================

i can successfully navigate to the page using
wb.Navigate2 <some_page_with_frames>
but when i attempt to focus on known elements on the visible page, the "set hInp = hDoc.getElementById(element_id)" command results in "hInp = nothing" because i am focusing on the parent frame.... i've tried numerous ways to resolve this but no success

=======================================
==== the general structure of the project is this:
=======================================

wb = webbrowser control
hDoc = mshtml.HTMLDocument
hInp = mshtml.HTMLInputElement
.
wb.Navigate2 <some_page_with_frames>
.
Set hInp = hDoc.getElementById(element_id)
hInp.focus
hInp.value = pvalue

=======================================
==== web page structure:
=======================================

<html>
<head>
<title>sometitle</title>
</head>
<frameset rows="20,*" border="0" framespacing="0" cols="*">
<frame name="navigation_frame" src="locationx" scrolling="no" noresize frameborder="NO">
<frame name="main_frame" src="locationx" noresize>
</frameset>
<noframes>
</noframes>
</html>

OLE Automation With VB6
How can I pass a string variable to an MSAccess macro when I activate the macro using VB6?

eg:

Dim objAccess As Object
Dim Str_Macro As String
Str_Macro = "Weekly_report"

Set objAccess = CreateObject("Access.Application")


objAccess.OpencurrentDatabase Database, True
objAccess.Visible = True
objAccess.docmd.runmacro Str_Macro

End Sub

IE Automation Via DLL
A few years ago I made a DLL that automated Internet Explorer as a work around to send email. I had an ASP page that sent email using CDONTS. I would call my DLL and have it pass parameters via the querystring to the ASP page from reference to shdocvw.dll Then that page sent email and all was good.

Now, I am doing just about the same thing to use a PDF printer to make a PDF of a web page, but I am getting some strange errors. Sometimes I get an Automation Error when I tell IE to navigate to the page. Here is the really stange part, it only happens sometimes. If I get rid of my DLL and run the project in the VB IDE it works fine everytime. But, it only works compiled if I run it from the actual user that will be calling the DLL. What I mean is, I have to make like a VBS file to call the DLL logged in as the user that will be doing the calling when it is called from an ASP page. I am using the DLL in COM+ so that I can have a different user other than the IUSR_ account run it. For my purposes the user is COMPlusUser. I login to the server as this user. Then run the .vbs file which just calls the DLL exactly like the .asp page would. Then I log off the server, and run the asp page from a remote computer. Everything is fine. However, if I reboot the server and try to run the .asp page from anywhere, a remote computer or even the server, I get an Automation error in the routine that I use to navigate the IE object to a web page.

This is driving me crazy, my first thought is to run that .vbs file in the task scheduler on windows startup, but I would rather IE just work

IE Automation
Hello,

What I am trying to do is automate a login to a website for users, so they click a button and then it takes them to the webpage, automatically logs them in and puts them on the page they need.

However, I am having trouble with the login part. After I click the link a Popup box shows up and it wants me to enter the username and password into the popup box. Does anyone know how to get control of the popup box so that I can enter the values and hit okay?

Thanks,

Ryan

Ole Automation
Hello Friends.,

When I use Ole automation and use get object to open a document file , it does not work in all the machines.

·I used Getobject to create a new document at run time
·I selected Microsoft word 9.0 object library from the references.
·So only if an other system has this same version 9.0 , it works.
·Can I create a cab file and select msword9.olb (the corresponding file for Microsoft word 9.0 object library) to the files needed for installation so that every thing works perfect irrespective of the machines.
·Please help me out.

Thank you
shoba

Anyone Here Use Automation???
Anyone use automation in their apps/
Any examples?

Woka

A Bit Of Automation?
I am fairly good at program in visual basic. I ain't no guru but I can get around .

For several days now I have been trying to automate tests on several of my web pages with visual basic. I was wondering if anyone could refer me to a web page where they discuss automation with visual basic or maybe if anyone could tell of a good book they read on automation again wiht visual basic?

I have tried programs that were built specifically toward automation like visual test, winrunner and doctor html . These programs are fine if yoru testing desktops but when it comes to playing with applets, javascript, dhtml, flash or even frames in html they leave alot to be desired!

Well thank you very much for your time and help!

Fraggy

)

PDF Automation
I would like to know if it is possible to create a table of contents in a PDF file using Visual Basic. I have a DB that prints reports and the reports are saved in PDF files, there is a lot of files now and i would like to create a VB program that will i would create the table of contents as each new file is made.

Second if this is possible, how would i go about doing this? Where can i go to find additional information on how to do this?

Thanks to all that reply.

OLE Automation
Whats OLE Automation???

Copyright © 2005-08 www.BigResource.com, All rights reserved