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




Document.all && Runtime Error 91


Code:
Private Sub brwWebBrowser_DocumentComplete(ByVal pDisp As Object, URL As Variant)

With brwWebBrowser
.Document.All.Item("txtwhatever").Value = "somestring"
.Document.All.Item("btnSubmit").Click
End With

Code above will submit the values and click the submit button, browser will display the resultspage displaying the result of somestring.
It generates an error 91 after this

pse advise




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Visual Basic Runtime Error "Error Saving Document
Dear all,
I am saving a document from vb. While saving I get this error. This error occurs only when I run the exe file. This problem doesnt occur while developing the project.
There is no problem with the path. What else may be the problem?

How to rectify this error " Error saving Document" in visual basic 6.0

Pls Help, this is very urgent.

Thanks to all.

Rgds,
Visha

VB Runtime Error "Error Saving Document"
Dear all,

When I try to save a word file from vb, I am getting the error "Error saving document".
There is no problem with the path. What else may be the problem.

Pls Help....this is very urgent.

Thks n rgds,
Vishalakshi

How Can I Change In Runtime The Document Associated To A OLE Obje Ct ???????
Hi all,

I have a form with an OLE object, and I want in run time change the document
associated to it OLE object ...
I assign a new path to the SOURCEDOC property ... but this didn't works ...
How can I solve this ???



Can anyone help?
Thanks in advance
Abilio

Runtime Error 52, Bad File Name Or Number && Path/File Error Runtime 75 HELP!!!
Alright, I had recieved some help on a different board, but my problem wasn't resolved... The code is for a button for the user to choose the files to add to the listview, for upload later in the ftp program. The problem is that it seems to give a runtime error 52 once you try to add more than 3,4, or 5 files, and the "solution" which was given to me by another poster, doesn't work. It results in eliminating the runtime error 52 and bringing out a err 75... Below is the original code that generates the runtime error 52 when 4 or more or so files are added.. :

Dim strfilename As String
Dim vFiles As Variant
Dim lFile As Long
Dim Y As Long
With wizard_main.CD1
.Filename = "" 'Clear the filename
.CancelError = False 'Gives an error if cancel is pressed
.DialogTitle = "Select File(s)... (Multi Select)"
.Flags = cdlOFNAllowMultiselect Or cdlOFNExplorer Or cdlOFNHideReadOnly 'Falgs, allows Multi select, Explorer style and hide the Read only tag
.Filter = "All files (*.*)/*.*"
.MaxFileSize = 9999
.ShowOpen
vFiles = Split(.Filename, Chr(0)) 'Splits the filename up in segments
If UBound(vFiles) = 0 Then ' If there is only 1 file then do this
Open .Filename For Binary Access Read As #1
Size = LOF(1)
Close #1
DoEvents
DoEvents
Set Item2 = frmmain.ListView3.ListItems.Add(, , .FileTitle)
Item2.SubItems(1) = .Filename
DoEvents
Item2.SubItems(2) = frmmain.mFTP.GetFTPDirectory
DoEvents
Item2.SubItems(3) = frmmain.TxtConnectedTo.Text
DoEvents
Item2.SubItems(4) = Size
Y = Item2.SubItems(4)
DoEvents
DoEvents
frmmain.TxtTotalBytesQueued.Text = frmmain.TxtTotalBytesQueued.Text + Y
frmmain.Text1.Text = frmmain.Text1.Text + Y
DoEvents
DoEvents
DoEvents
Item2.SubItems(5) = "Upload"
DoEvents
Else
For lFile = 1 To UBound(vFiles) ' More than 1 file then do this until there are no more files
Open vFiles(0) + "" & vFiles(lFile) For Binary Access Read As #1
Size = LOF(1)
Close #1
DoEvents
DoEvents
Set Item2 = frmmain.ListView3.ListItems.Add(, , vFiles(lFile))
DoEvents
Item2.SubItems(1) = vFiles(0) + "" & vFiles(lFile)
DoEvents
Item2.SubItems(2) = frmmain.mFTP.GetFTPDirectory
DoEvents
Item2.SubItems(3) = frmmain.TxtConnectedTo.Text
DoEvents
Item2.SubItems(4) = Size
Y = Item2.SubItems(4)
DoEvents
DoEvents
frmmain.TxtTotalBytesQueued.Text = frmmain.TxtTotalBytesQueued.Text + Y
frmmain.Text1.Text = frmmain.Text1.Text + Y
DoEvents
DoEvents
DoEvents
Item2.SubItems(5) = "Upload"
DoEvents
Next
End If
End With


* Open vFiles(0) + "" & vFiles(lFile) For Binary Access Read As #1 is the problematic line


*************************************************************************************8

Below is the code which was suggested, and fixes the first problem, but upcomes a new problem..


Dim vFiles As Variant
    Dim lFile As Long
    Dim intfile As Integer
    Dim Y As Long
    With CD1
        .Filename = "" 'Clear the filename
        .CancelError = False 'Gives an error if cancel is pressed
        .DialogTitle = "Select File(s)... (Multi Select)"
        .Flags = cdlOFNAllowMultiselect Or cdlOFNExplorer Or cdlOFNHideReadOnly 'Falgs, allows Multi select, Explorer style and hide the Read only tag
        .Filter = "All files (*.*)/*.*"
        .MaxFileSize = 9999
        .ShowOpen
        vFiles = Split(.Filename, Chr(0)) 'Splits the filename up in segments
    If UBound(vFiles) = 0 Then ' If there is only 1 file then do this
    intFile = FreeFile()
    Open .Filename For Binary Access Read As #intFile
    Size = LOF(intFile)
    Close #intFile
    DoEvents
    DoEvents
    Set Item2 = ListView3.ListItems.Add(, , .FileTitle)
    Item2.SubItems(1) = .Filename
    DoEvents
    Item2.SubItems(2) = mFTP.GetFTPDirectory
    DoEvents
    Item2.SubItems(3) = frmmain.TxtConnectedTo.Text
    DoEvents
    Item2.SubItems(4) = Size
    Y = Item2.SubItems(4)
    DoEvents
    DoEvents
    TxtTotalBytesQueued.Text = TxtTotalBytesQueued.Text + Y
    Text1.Text = Text1.Text + Y
    DoEvents
    DoEvents
    DoEvents
    Item2.SubItems(5) = "Upload"
    DoEvents
    Else

    'i changed the next line from For lFile = 1 To UBound(vFiles)
    For lFile = 0 To UBound(vFiles) 'More than 1 file then do this until there are no more files

    intfile = FreeFile()
    'hmmm you really need to look at the next line. not sure why the backslash is in there
    'Open vFiles(0) + "" & vFiles(lFile) For Binary Access Read As #intfile
    'try this instead:
    Open vFiles(lFile) For Binary Access Read As #intfile
    Size = LOF(intfile)
    Close #intfile

    DoEvents
    DoEvents
    Set Item2 = ListView3.ListItems.Add(, , vFiles(lFile))
    DoEvents
    Item2.SubItems(1) = vFiles(0) + "" & vFiles(lFile)
    DoEvents
    Item2.SubItems(2) = mFTP.GetFTPDirectory
    DoEvents
    Item2.SubItems(3) = frmmain.TxtConnectedTo.Text
    DoEvents
    Item2.SubItems(4) = Size
    Y = Item2.SubItems(4)
    DoEvents
    DoEvents
    TxtTotalBytesQueued.Text = TxtTotalBytesQueued.Text + Y
    Text1.Text = Text1.Text + Y
    DoEvents
    DoEvents
    DoEvents
    Item2.SubItems(5) = "Upload"
    DoEvents
    Next
    End If
    End With


***********************************************************************************

I would really appreciate it if someone could help me fix this bug ...



Edited by - AbsintheDrinker on 4/13/2004 11:43:04 PM

RunTime Error 3075 - Syntax Error (Missing Operator) In Query Operession
Hi all
sorry for the inconveniences, I just wanna get this syntax thing out of my back.

I modified my vb module and now I'm getting "Run-Time error 3075 syntax error(Missing operator) - query expression"

Then it displayed this line of code as the problem line:
Code:
'TblPersonnel.[Name] = TblRequests.Personnel1 Union All
Select TblRequests.ProjectID'. <==== Error occurs here


I can't seem to figure out why my SQL statement is bumming out on the above line.

Below is my complete module:
Code:
DbPath = "\515opsisdallf00008SHAREDPyrlAppsPTStest2"

DbName = "PTS.mdb"

Set Db = OpenDatabase(DbPath & DbName)

strSQL = "Insert Into TblProgrammersHours (ProjectID,ProgrammerInitials, CurrProgHrs, PrevProgHrs, TotalProgHrs, Positions)"

strSQL = strSQL & " Select TblRequests.ProjectID, TblPersonnel.Initials, TblRequests.Prog1hrs, TblRequests.PrevProg1Hrs, TblRequests.TotalProg1hrs, 1 As Position " _
& "From TblRequests Inner Join tblPersonnel On TblPersonnel.[Name] = TblRequests.Personnel1 "

strSQL = strSQL & "Union All " _
& " Select TblRequests.ProjectID, TblPersonnel.Initials, TblRequests.Prog2hrs, TblRequests.PrevProg2Hrs, TblRequests.TotalProg2hrs, 2 " _
& "From TblRequests Inner Join tblPersonnel On TblPersonnel.[Name] = TblRequests.Personnel2 "

strSQL = strSQL & "Union All " _
& " Select TblRequests.ProjectID, TblPersonnel.Initials, TblRequests.Prog3hrs, TblRequests.PrevProg3Hrs, TblRequests.TotalProg3hrs, 3 " _
& "From TblRequests Inner Join tblPersonnel On TblPersonnel.[Name] = TblRequests.Personnel3 "

strSQL = strSQL & "Union All " _
& " Select TblRequests.ProjectID, TblPersonnel.Initials, TblRequests.Prog4hrs, TblRequests.PrevProg4Hrs, TblRequests.TotalProg4hrs, 4 " _
& "From TblRequests Inner Join tblPersonnel On TblPersonnel.[Name] = TblRequests.Personnel4 "

strSQL = strSQL & "Union All " _
& " Select TblRequests.ProjectID, TblPersonnel.Initials, TblRequests.Prog5hrs, TblRequests.PrevProg5Hrs, TblRequests.TotalProg5hrs, 5 " _
& "From TblRequests Inner Join tblPersonnel On TblPersonnel.[Name] = TblRequests.Personnel5 "

strSQL = strSQL & "Union All " _
& " Select TblRequests.ProjectID, TblPersonnel.Initials, TblRequests.Prog6hrs, TblRequests.PrevProg6Hrs, TblRequests.TotalProg6hrs, 6 " _
& "From TblRequests Inner Join tblPersonnel On TblPersonnel.[Name] = TblRequests.Personnel6 "

strSQL = strSQL & ") As NewProgHrsTbl"

Call Db.Execute(strSQL)


Thanks.
giftx

Runtime Error '3077' Syntex Error (missing Operator) In Expression
Hi everyone,

I have a combo box on a form that finds records in a table or query. It works fine except for string with an apostrophe on it - and the string is,

IED_Headcount 'ADODB' error message

It gives me a Runtime Error '3077' Syntex error (missing operator) in expression. I found out the reason I am getting this error is because the word 'ADODB' has aphostrophe on it.

My code for the Find Records Combo Box is,

Private Sub Combo84_AfterUpdate()
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Issue] = '" & Me![Combo84] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

End Sub

Can you please help me with the necessary code to escape the error.

I certainly appreciate your help and thank you in advance.

Dewan

Excel XmlHTTP Object Error Message - System/runtime Error
Hi guys,

Thanks for reading my thread. This is a VBA problem for something in Microsoft Excel - I wasnt sure if I should really be posting this problem on this kind of forum, so apologies if I am in completely the wrong place! I have looked on google and used the search feature and found very limited information that is useful to me.

I am having trouble with a very simple few lines of code in a macro. The code looks like this:



Code:


Function startmarketIDs()

Dim targeturl, writerow, readrow, textmass, xmlHTTP

targeturl = "http://lite.betfair.com/Events.do?s=00010913z"

Set xmlHTTP = CreateObject("Microsoft.xmlHTTP")

xmlHTTP.Open "GET", targeturl, False
xmlHTTP.send

MsgBox xmlHTTP.StatusText
textmass = xmlHTTP.responsetext

MsgBox textmass

End Function



My problem occurs at the line "textmass = xmlHTTP.responsetext"

The responsetext command is obviously causing problems because if I remove it, the code executes without error and the "xmlHTTP.statustext" says "OK". With the responsetext command left in, the code generates the following error:

Run-time error '-1072896658 (c00ce56e)':

System Error: -1072896658.

If I change the targeturl to www.betfair.com, the code executes fine and I get a message box (as desired) with the source code of the website displayed. There is therefore something about the url or the way in which I am using the xmlHTTP object that is causing the issue, I wondered if someone would mind inspecting my code and perhaps pointing me in the right direction?

I am not an expert in VBA programming, and I feel a little out-of-my-depth using the xmlHTTP object, but Id really like to get hold of the source code of the targeturl so that I can parse it for some data that I require. Thanks to anyone who can offer me any assistance,

Regards,

Porky / Paul

RunTime Error 75: Path/File Access Error.
Hi all,

This is blowing my mind!

I have the following piece of code which I have been testing:-


Code:
file_name = "C:Documents and SettingsHomeDesktopTest1.xls"
save_to = "D:Test1_(" & Format(Now, "dd-mmm-yyyy") & " " & Format(Now, "hh_mm_ss") & ") " & ".xls"

FileCopy file_name, save_to
I have run the code 14 times (on separate cd's) and it's copied the file to the cd drive ("D:") every single time.

All of a sudden, I am getting a RunTime Error 75: Path/File access error . Why?

If I manually copy and paste to the D drive it works. I use FileCopy, it returns an error. I change the path from D to C, it works. I have searched millions of sites and cannot find an answer.

Thanks in advance,
Paul.

RunTime Error :75 Path/file Access Error
the error message "RunTime error :75 path/file access error" appear in my application , the error raised not for all clients( all win2000/winXP ),the clients that have the user name that contains dot character( eg Moh.issam) have this error, but the users that hav nor contain dot character (eg Moh ) have not the error .

the error occured when i open the connection.

Thanks

Cant Trap Runtime Error 3043 Disk Error
Hi, i cant seem to trap the above error, ive tried going
'on error go to lerror'
and it does to go lerror and prints out the error message but also crashes with this runtime error

any ideas???

i cant use on error resume next i need to trap it

Runtime Error 20534 Error Detect By Database Dll
Please HELP!!!
i get this error in my app on another machine: runtime error 20534
error detected by database dll
i need to get this fixed asap and dont know how....
i dont have the problem on my system.... when i install the app on another machine i get this errror when i try to view a report...
i am using vb6 to create my app and access97 and cr4.6, winxp
i can manipleate the data in my app and ect... but cant view print reports....
waht is causing this error? and how can i fix this....?
thanks

RunTime ERROR '6160' Data Access Error
RunTime ERROR '6160' Data Access Error

Does anyone know where i can find out what this means? Ive tried the official microsoft site without much luck

any help would be greatly appreciated

thx

RunTime Error 3134 Syntax Error In INSERT INTO
I have gone over and over this and cannot find the issue with this code can anybody help me?

Dim StrSql As String

StrSql = "INSERT INTO [Customer Table] ([Customer ID], [First Name], [Last Name], [Company Name], [Main Phone], [Alt Phone], [Address]) SELECT " & [Customer ID] & " As [Customer ID], " & [First Name] & " As [First Name] , " & [Last Name] & " AS [Last Name], " & [Company Name] & " AS [Company Name], " & [Main Phone] & " AS [Main Phone], " & [Alt Phone] & " AS [Alt Phone], " & [Address] & " AS [Address];"
 DoCmd.RunSQL (StrSql)


RunTime ERROR '6160' Data Access Error
RunTime ERROR '6160' Data Access Error

Does anyone know where i can find out what this means? Ive tried the official microsoft site without much luck

any help would be greatly appreciated

thx

Runtime Error 429: Error Creating Object...
Hi,

I've got the following problem. I wrote a Visual Basic application which creates an Excel 2000 object and which creates an Excel sheet with several charts. Now, some of our co-workers changed to Windows XP and Office XP. So when I start the creation of the Excel sheet out of my application on one of these machines, I always get the Runtime Error 429. I had a look at the Microsoft webpage. They recommended to use DAO 3.6 instead of DAO 3.0...But it still doesn't work.
A thought: Should I compile and create the application under Windows XP with an installation of Visual Studio? Does this help because of newer libraries?

Any ideas?

Thanks a lot!

Harry

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 '9': Subscript Out Of Range Error!
Hi there,

I keep getting the error message 'Runtime error '9': subscript out of range" when I execute my VB6 application on another machine (this machine doesn't have VB6 installed). I can run another program of mine, but not this one. When I run the program that doesn't work properly, I can't see the text/labels and the database doesn't work. All the connect strings are correct and the database file is in the right directory.

Is there a VB6 'helper' program I need that loads files/settings etc to make VB6 applications work on other machines?

Thanks in advance.

Regards,

Simon

What Is Trappable Error? What Is Untrapped Runtime Error?
Quote:




A trappable error is a runtime error that has not already been trapped. An untrapped runtime error is any runtime error generated by a statement which does not specify an error variable (this includes statements which can have an optional error variable parameter, but which do not).




What is trappable error? What is untrapped runtime error? Pls give some examples... Thanks.

'runtime Error 13, Type Mismatch Error'
Some of my useres are getting this error, what does it mean? I don't get it??? the app works good on all my systems????

Capture Runtime Error As Error Handler
Does anyone know how I could go about and do this? I have a program I wrote that inserts stuff into sql, and it gives an error when it hits a duplicate, and I would like to capture that error and save it to a log or something. The error I get is

"run-time error '-2147217873(80040e2f)';"

but I dont know how to deal with them, besides a nice On Error Resume Next

Datareport Error Runtime Error 8577
I am using a vb front end to a ms sql server 6.5 database to create a datareport. If I run this front end on the computer on which the ms sql server runs, the datareport runs fine. But if I install the front end on another computer and try to open the reports, I get the runtime error 8577 (failed getting Rowsetts from current data source. I know that the front can access the server and that a connection exists. The only problem is that of the datareport. Does anyone know how to fix this problem?

G. Rush

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

CommonDialog RunTime Error Even WITH Error Trapping
Right, heres the code

Code:
Private Sub cmdAddFiles_Click()

'DIM LINES
'*
'*
'*
'*

On Error GoTo ErrHandler

'cdl is CommonDialog Control

cdl.InitDir = "\" & txtLocation.Text & txtRemotePath
cdl.flags = cdlOFNAllowMultiselect + cdlOFNExplorer + cdlOFNLongNames
cdl.CancelError = True

cdl.ShowOpen

'/
'/
'/
'/
'OtherCode
'/
'/
'/
'
Exit Sub



ErrHandler:
    If Err.Number = 32755 Then

    'CODE************
        
    End If

    Exit Sub

End Sub



Basically, even with the error trapping, the IDE is still throwing back a 32755 runtime error saying "User pressed Cancel" or something like that. I need code to happen if cancel is pressed. Is there something I'm doing wrong?

Thanks in advance

Xeno



Edited by - Xenobyte0 on 1/14/2005 5:08:43 PM

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 20515...Error In FOrmula
Hi There

I am using VB6 with CR report 8.0

getting two problem .

when ever i press to connect . the connection is too slow . it takes upto 3 minutes

after that some times it get connected well but some times i got error window stating

" Run Time Error 20515.. Error in FOrmula "
when u press ok . program window ends up.

my platofrm is Windows NT.
suggest me asap

regards
bsheikh

Error:Document Already Open
Can Anyone Help!!

I have created a excel document containig macros and a custom toolbar.

I have the same file saved in 2 separate locations (one backup) and although it lets me open the file, when i try to run the macro from the custom toolbar i get an error stating that a document with the same name is alredy open - BUT THIS IS NOT THE CASE as no other excel documents are open at this time.

The macro runs ok when i run it manually but the problem always occurs when i run the file from the shared drive (Windows NT4) within the network.

Paul

Active X Document Error
Hi,

I have created my active x document exe and uploaded it the net using the html file genarated by the package and distubution wizard, but when i click on the link to the active x document i get the save/open dialog instead of ie actullay running it, Why is this caused ?, and how can i fix it?

Thanks In Advance
The_Vb_man

WebBrowser.document Error (438)
Can someone tell me what is wrong with the below code? It runs fine on XP PRO, but I get a runtime error 438 "Object doesn't support this property or method" when run on WIN98. Here is a snipet of code were I seem to be getting the error.

Thanks


Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)

If URL <> vbNullString And URL <> "http:///" Then
If Mid$(URL, InStr(1, URL, "?") + 1) = "SignIn" And blnShutDown = False Then

****HERE is were the break begins:

WebBrowser1.Document.All.nameditem("userid").Value = Text1.Text

Error In Document.Refresh
Hi everyone
I am trying to run a macro from the VB program
So I copied the macro in the vb program and tried to run the VB program
This is the vb program:

Code:



'Declearation of variables and connectin to BO works fine
'Assignign the document .rep also works fine


AMoc.Variables.Item("1. Select Appointment Start Date (MM/DD/YYYY) :").Value = FLSSDateRS(0)



AMDoc.Variables.Item("2. Select Appointment End Date (MM/DD/YYYY) :").Value = FLSSDateRS(1)



AMDoc.Variables.Item("3. Select Division (or % for ALL) :").Value = "%"



AMDoc.Variables.Item("4. Select Origin Location ID-Name (or % for ALL) :").Value = "%"



AMDoc.Variables.Item("5. Select Destination Location ID-Name (or % for ALL) :").Value = "%"



AMDoc.Variables.Item("6. Select Carrier SCAC-Name (or % for ALL) :").Value = "%"

'Refresh the document

AMDoc.Refresh 'The culprit!!



he moment the program reaches AMDOC.Refresh, it takes around 10 minutes and then throws the following error:
(see image attached)

I am able to refresh the report from Desktop Intelligence(which means universe etc settigns are correct) but I dont understand why this program is throwing any error
Please help!!

PS: Also, please let me know if there is a better way to schedule the macro in BO XI

Document Not Saved Error
I need to delete sheets in a file then then import them from another file. I am doing the same a follows:
Code:
    Sheets("Dummy Sheet").Visible = True
    Application.DisplayAlerts = False
    For i = Sheets.count To 2 Step -1
        Sheets(i).delete
    Next
    Set curWorkbook = ActiveWorkbook
    Workbooks.Open Filename:=c_filename
    Set openWorkbook = ActiveWorkbook

    For i = 1 To openWorkbook.Sheets.count
        openWorkbook.Sheets(i).Copy After:=curWorkbook.Sheets(i)
    Next
    curWorkbook.Sheets("Dummy Sheet").Visible = False
    curWorkbook.Save
    openWorkbook.Close Savechanges:=False
    Application.DisplayAlerts = True


The dummy sheet is there because excel does not allow me to delete all the sheets. I unhide it before deleting the other sheets and hide it again after importing is done.

However on the line curWorkbook.save i get a error saying document not saved. I am not sure why this error occurs.

Also even if i dont try to save the file in the code but try to save it from excel it still gives the same error.

Someone please help.

PKJ

'Document Not Saved Error'
I am deleting the sheets I have in a file and import new ones from another file. However after I do this, I am not able t save the file that I imported the sheets into. Excel gives an error saying 'Document not Saved'. What can be the reason.

Thanks in advance

Loading Word Document Error
Hi there I am automating a word application using visual basic.
I encouter the following error when i load the word file using the word object?
"An error occurred while Loading "thisdocument". Do you wnat to continue loading this project?" that's a message box with title "Microsoft Visual Basic" so I am assuming that there is also a visual basic embedded in the word file. that's the error that word is giving to me. Is there a way that I can disable or checkh whether the document is properly loaded before i go on with other stuffs using the word object?
This error also shows even if I only double click the word file.

Thanks!




IANIAN

Error Code With Load XML Document
Hi People,
i have a problem with the load XML Document
Here is the code :
**************************

Code:
If oXMLDoc.Load(strHTTP) Then
Set NodeList = oXMLDoc.getElementsByTagName("root")
For Each Element In NodeList
MsgBox oXMLDoc.documentElement.xml
If (Element.getAttribute("TRX_ERROR")) <> "" Then
LOGON = StringDeError(Element.getAttribute("TRX_ERROR"))
WriteErrorLog LOGON, strHTTP
Exit Function
End If
Next
Else
If (oXMLDoc.parseError.errorCode <> 0) Then
Dim myErr0
Set myErr0 = oXMLDoc.parseError
LOGON = GetSysIni("Errores", "Error1", App.path & "MsgErrores.ini")
WriteErrorLog LOGON, strHTTP
End If
**********************************
the errorCode : -1072896682
the reason : "Invalid at the top level of the document.
the readyState : 4
the srcText : "<root COD_PERFIL="5" CUIT="***********" ESTADO="A" OPERATION_ID="LOGON" PROVEEDOR="98765" RAZON_SOC_PROV="********************" REQUIREMENT_ID="LOGON_KIOSCO" USER_ID="KIOSCO"></root" IS OK
the url : "http://...." IS OK


Somebody can help me ? Any idea ?

thanks in advance

Error Printing A Word Document
Hii

I have a program that takes the data from the form and inserts into a word template. and when it tries to print the word file as saving it there is a message

"Word is currently printing. Quitting word will cancel all pending print jobs, Do you want to quit word? " [Yes/ No]

and if i click Yes there is no printout.
but can someone help me why is this comming.

Error When I Don't Save A Word Document
After inputing some info on a form, it fills out a receipt in Word format and automatically pops open the save dialogue box. But when they click Cancel I get a "Command Failed" error message. How do I fix this?


VB Code:
Private Sub createWord()    Dim subtotal As Currency        Call initializeWord        Set doc = objWord.Documents.Add(discpath, False)    objWord.Visible = True    objWord.Activate        With ActiveDocument        .Bookmarks("orgName").Range = Adodc3.Recordset!o_name        .Bookmarks("groupCoord").Range = Adodc3.Recordset!o_coordlname & ", " & Adodc3.Recordset!o_coordfname        .Bookmarks("dateUsed").Range = Adodc3.Recordset!r_arrive & "-" & Adodc3.Recordset!r_depart        .Bookmarks("address").Range = Adodc3.Recordset!o_street        .Bookmarks("city").Range = Adodc3.Recordset!o_city        .Bookmarks("state").Range = Adodc3.Recordset!o_state        .Bookmarks("zip").Range = Adodc3.Recordset!o_zipcode                If Adodc3.Recordset!o_phoneExt = "" Then            .Bookmarks("homephone").Range = Adodc3.Recordset!o_phone        Else            .Bookmarks("homephone").Range = Adodc3.Recordset!o_phone & " x" & Adodc3.Recordset!o_phoneExt        End If                If Adodc3.Recordset!o_coordExtension = "" Then            .Bookmarks("secondphone").Range = Adodc3.Recordset!o_coordContact        Else            .Bookmarks("secondphone").Range = Adodc3.Recordset!o_coordContact & " x" & Adodc3.Recordset!o_coordExtension        End If                For i = 1 To 20            .Bookmarks("people" & i).Range = txtRoom(i).Text            .Bookmarks("night" & i).Range = txtDays(i).Text            .Bookmarks("cost" & i).Range = lblRoomTotal(i).Caption            'subtotal = FormatCurrency(subtotal, 0) + FormatCurrency(lblRoomTotal(i).Caption, 0)        Next                .Bookmarks("noovernight").Range = txtNoStay.Text        .Bookmarks("noovernightcost").Range = txtNoStay.Text * noStay        .Bookmarks("othercharges").Range = otherCharges        .Bookmarks("subtotal").Range = sum                If Adodc3.Recordset!r_depositpaid = vbChecked Then            .Bookmarks("depositduedate").Range = "Yes"            .Bookmarks("depositamount").Range = Adodc3.Recordset!l_deposit        Else            .Bookmarks("depositduedate").Range = "No"        End If                .Bookmarks("balanceduedate").Range = Now() + timeToPayBill        .Bookmarks("balance").Range = Adodc3.Recordset!r_amountdue        .Save    End WithEnd Sub

Excel+ASP - Document Not Saved Error Help!!
Have never needed to do this and have never tried it...

but...

Have you tried saving before destroying the worksheet?

If I'm having a lucky day, I'm not talking out of the wrong hole

WebBrowser.Document.write ERROR
when i use WebBorowser.Document.write i get an error "obeject variable or withblock variable not set" i think u have to put WebBrowser.document.open or something like that can u help me

Printing Using Report Document ERROR..!
WHen i uses the default Print button in the crystal report viewer, printing is accordingly wat is shown in the viewer... But when i specify my own printing button USING REPORT DOCUMENT Printing... The reports comes out differently as what is shown in the crystal report viewer.. Different in the way that it printed our a different Set of data which i did not select..Please Plaease HElp..Thx...

Runtime Error 48, Error Loading Dll
Hi. I made this program in VB6 that uses excel and word libraries. I didn't make a setup program but I used the package & deployment wizard to get the list of dependencies (dlls, ocxs, tlbs etc). The problem we have now is that we installed another application on all PCs in the company (Business objects 6 if anybody knows it) and my program generates this error at startup: "Runtime error 48, Error loading dll". I tried to overwrite the dlls, ocxs or tlbs that I got from the p&d wizard with no luck (some it wouldn't let me copy so I went into safe mode and overwrote them). What else can I try to fix this? Thanks!

Runtime Error 6 - Overflow Error
Can any one help !!!???

I'm trying to do this simple equation in excel:

Sheet1.Cells(9, 6).value = (Sheet1.Cells(8, 6).value / Sheet1.Cells(6, 6).value) * 100
Sheet1.Cells(12, 6).value = (Sheet1.Cells(11, 6).value / Sheet1.Cells(6, 6).value) * 100
Sheet1.Cells(15, 6).value = (Sheet1.Cells(14, 6).value / Sheet1.Cells(6, 6).value) * 100

... it is to work out the percentage of two numbers in different cells, and putting the answer into another cell, but when it runs, it just comes up with "Run Time error '6', Overflow".

The values will always be between 0 - 30, so it's not outside the integer range, just not sure why it's happening!!

Thanks in advance!!

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

Runtime Error 75 Access Error
I keep getting the following error,


Quote:




Run-tim error '75':

Path/File access error






When i run this line of code.


Code:
MkDir ("C:Program FilesRMB")


It didn't used to but it just started now and same with my mates pc.

Any help?

Runtime Error 482 Printer Error
I get a “Runtime Error 482 Printer Error” when I try to print to a colour printer I don’t get it when I print to a PDF spooler or another black and white printer.
The colour printer is working, does have paper and I can print to it from other applications.
Any reasons why this is and is there a way I can be sure my application can print to any printer that is attached to the computer?

Create Dll And Get Error Runtime Error 91
I have create a dll and now I get the error message

Runtime error 91
Object variable or With block variable not set.

No matter what I do in the app. If I attempt to access the dll this is the message I get. What happened it used to work. What happened????


VB Code:
Option Explicit Public GenRtns As New clsRSGenRtns Public Sub Main()Dim cmd As StringDim x As Integer     cmd = Trim(Command)    x = Len(cmd)        [b]GenRtns.InitializeDll App[/b]  ' Error here    InitXPStyles        frmMain.Show vbModalEnd Sub

I Keep Getting This Error Msg -runtime Error 2147483638-
I found out that it -runtime error 2147483638- means "The data necessary to complete this operation is not yet available." so I though that the xdoc.readystate != 4, yes I'm trying to:

Set nodes = xdoc.documentElement.selectNodes("//TITLES")

For intNode = 0 To nodes.length - 1
MsgBox "title= " & nodes(intNode).nodeValue
Next

But I either get the above runtime error or "variable or object not set"... or what ever it is.

And oh even when the readystate IS = 4 I still get the runtime error.


Private Sub Form_Load()
Dim rf As New Msxml2.XMLHTTP40
Set xd = New Msxml2.DOMDocument40
Dim i As Integer
Dim intNode As Integer
Dim nodes As IXMLDOMNodeList

xd.async = False

rf.open "GET", "http://mysite.asp" _
, True

rf.send
Set xd = rf.responseXML
MsgBox "the state= " & xd.ReadyState

If xd.parseError.errorCode = 0 Then
Else
MsgBox xd.parseError.reason & vbCrLf & _
"Line: " & xd.parseError.Line & vbCrLf & _
"XML: " & xd.parseError.srcText
End If

Set nodes = xd.documentElement.selectNodes("//TITLES")

For intNode = 0 To nodes.length - 1
MsgBox "title= " & nodes(intNode).nodeValue
Next

xd.save "c:/temp.xml"
Set nodes = Nothing
Me.Visible = False
End Sub

(Resolved)Error When Editing A Word Document From Vb
ok, im trying to edit a word docment from vb all the lines work fine but one and i dont understand why here is the code


Set ObjWord = New Word.Application

' Name of report file, change path to whatever is applicable
ObjWord.Documents.Open ("d:1040ez.doc")

' Calling subroutines with header and data
Call RepPara("#FIRST", strFirstName)
Call RepPara("#MI", strMI)
Call RepPara("#LAST", strLastName)
Call RepPara("#S1", strSS1)
Call RepPara("#S2", strSS2)
Call RepPara("#S3", strSS3)
If blnJoint = True Then
Call RepPara("#DFIRST", strSFirst)
Call RepPara("#SMI", strSMI)
Call RepPara("#SLAST", strSLastName)
Call RepPara("#S4", strSS1)
Call RepPara("#S5", strSS2)
Call RepPara("#S6", strSS3)
End If
If blnJoint = False Then
Call DelPara("#SFIRST", True)
Call DelPara("#SMI", True)
Call DelPara("#SLAST", True)
Call DelPara("#S4", True)
Call DelPara("#S5", True)
Call DelPara("#S6", True)
End If
Call RepPara("#ADDRESS1", strStreet)
Call RepPara("#APT", strAPT)
Call RepPara("#ADDRESS2", strCityState)

Call RepPara("#BLOCK1", strLine1)
Call RepPara("#BLOCK2", strLine2)
Call RepPara("#BLOCK3", strLine3)
Call RepPara("#BLOCK4", strLine4)
Call RepPara("#X5", strX5)
Call RepPara("#X6", strX6)
Call RepPara("#BLOCK5", strLine5)
Call RepPara("#BLOCK6", strLine6)
Call RepPara("#BLOCK7", strLine7)
Call RepPara("#BLOCK8", strLine8)
Call RepPara("#BLOCK9", strLine9)
Call RepPara("#BLOCK9B", strLine9a)
Call RepPara("#BLOCK10", strLine10)
Call RepPara("#BLOCK11", strLine11)
Call RepPara("#BLOCK12", strLine12)
Call RepPara("#BLOCK13", strLine13)

'Call RepPara("#S5", strSS5)

' temp = "You selected " & Str$(HScroll1.Value) & " on the scroll bar"
'Call RepPara("Q31", temp)
'Call RepPara("Q32", temp)
' Saves report with a new filename

ObjWord.ActiveDocument.SaveAs ("d:NewReport.doc")

' Quit Word
ObjWord.Quit
' Inform user that report is created
MsgBox "Report Created"
' Clear our pointer to word
' Set ObjWord = Nothing
' ShellExecute Me.hwnd, "Print", "d:NewReport.doc", _
' vbNullString, "c:", SW_HIDE 'or SW_SHOWNORMAL


End Sub
Private Sub RepPara(Header As String, Data As String)
With ObjWord.Selection.Find
.ClearFormatting
.Text = Header
.Execute Forward:=True
End With
Clipboard.Clear
Clipboard.SetText (Data)
ObjWord.Selection.Paste
Clipboard.Clear
End Sub
Private Sub DelPara(Header As String, Keep As Boolean)
With ObjWord.Selection.Find
.ClearFormatting
.Text = Header
.Execute Forward:=True
End With
If Keep = False Then
Call ObjWord.Selection.MoveDown(wdParagraph, 1, wdExtend)
End If
ObjWord.Selection.Delete
End Sub


the bolded line wihtin the code above is giving the error RyRef argument type mismatch, but i have shecked to ensure that the string it is looking at it a string and i am just a little stumped here can anyone please save me

Error While Using:WebBrowser1.Document.Forms(0).submit
Hi,

I am using a Webbrowser to open a Internet Site. And login to it by sending the values from the VB code. I submit the form for the same using,
WebBrowser1.Document.Forms(0).submit

There are multiple pages that have to be navigated and various forms to be submitted.

When I use the above in one url, the form gets submitted and the next page is redirected. And from the new redirected page if I am trying to submit the form I get the Error:" Object Variable or with block variable not set".

Can anybody let me know where I am going wrong.....

Regards,
Sanjanah

Error 4605 Try Sending Document To Email
I 'm trying to send my document to email or fax.
I use Word automation through my VB6 applucation.

I found some code but keep getting error 4605 ...mail is not installed on your system

The code
Appword.ActiveDocument.HasRoutingSlip = True
With Appword.ActiveDocument.RoutingSlip
  .Subject = "My seubject"
  .Message "Here is the body text"
  .AddRecepient = "Myemail@tiscali.be"
  .Delivery = wdAllAtOnce
end with
AppWord.ActiveDocument.route 'This line give the errror

Strange because OUtlook express is installed, and When i use the word menu, manually, choose File,Send To, Mail recepient, i can send a email.




Edited by - lvermeersch on 12/10/2005 1:56:05 AM

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