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
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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
OPENING VISUAL BASIC 6.0 ERROR, DAO350.DLL, &"Unexpected Error; Quitting&"
Hi,
I could really use some help. I am not the most knowledgable and would appreciate any guidance... I did a web search already at some sites including Microsoft, but I have not found a soultion yet.
Problem: CANNOT OPEN VISUAL BASIC 6.0; Says "Unexpected error; quitting"
Machine/Software:
OS: XP Media Center (although system info says XP Professional 5.1.2600 Service Pack2 Build 2600)
PC: Acer AspireE36
SW:Microsoft Visual Studio 6.0 Enterprise Edition
History:
1. Could not open visual basic 6.0. I got the an error that the DAO350.DLL could not be found.
2. So following some suggestions from the web:
a) Renamed old DAO350.DLL as DAO350.DLLOLD
b) I took this file from Visual Studio Disk 1 and copied it into the
C:Program FilesCommon FilesMicrosoft SharedDAO
c) Regsvr32 "C:Program FilesCommon FilesMicrosoft SharedDAODAO350.DLL"
d) Then I got a successful message that it registered
e) It did not work. When I tried to open the visual basic 6.0 now I get:
"Unexpected error; quitting" message.
WHAT DO I DO PLEASE?
I even loaded the component checker 2.0 as suggest via microsoft website to look up the Microsoft Data Access Components (MDAC).
(see Article ID: 304230 and 301202 on http://support.microsoft.com/kb/304230 and htpp://support.microsoft.com/default.aspx?kbid=301202))
It says MDAC 2.8 SP1 ON WINDOWS XP SP2. I am not sure what this MDAC does for me, but I looked at it anyways.
Error In Update Word Document Using Visual Basic
in win 2000 it was working but when i install win xp showing error in place marked red
VB Code:
Dim oApp As Word.ApplicationDim oDoc As Word.DocumentSet oApp = New Word.ApplicationSet oDoc = oApp.Documents.Open(App.Path & " est.doc")[color=Red]oApp.Run "auto"[/color][color=Red]oApp.ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=2, _ NumColumns:=2, _ DefaultTableBehavior:=wdWord9TableBehavior, _ AutoFitBehavior:=wdAutoFitWindowoApp.ActiveDocument.Tables(1).AutoFormat Format:=wdTableFormatSimple1, ApplyBorders _ :=False, ApplyShading:=True, ApplyFont:=True, ApplyColor:=True, _ ApplyHeadingRows:=True, ApplyLastRow:=False, ApplyFirstColumn:=True, _ ApplyLastColumn:=False, AutoFit:=True[/color] oApp.ActiveDocument.Tables(1).Cell(1, 1).Range.Text = Str1(1) oApp.ActiveDocument.Tables(1).Cell(1, 2).Range.Text = Str1(2) oApp.ActiveDocument.Tables(1).Cell(2, 1).Range.Text = Str1(3) oApp.ActiveDocument.Tables(1).Cell(2, 2).Range.Text = Str1(4) oApp.ActiveDocument.PrintOut While oApp.BackgroundPrintingStatus = 1 Wend oDoc.Content.Text = "" oDoc.Close Set oDoc = Nothing oApp.Quit Set oApp = Nothing
so it is not allowing to run or create table in word.
pls help
Edit: Added [vbcode][/vbcode] tags for more clarity. - Hack
Error In Update Word Document Using Visual Basic
hello
this is my code to update a word document
Dim oApp As Word.Application
Dim oDoc As Word.Document
Set oApp = New Word.Application
Set oDoc = oApp.Documents.Open(App.Path & " est.doc")
oApp.Run "auto"
oApp.ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=2, _
NumColumns:=2, _
DefaultTableBehavior:=wdWord9TableBehavior, _
AutoFitBehavior:=wdAutoFitWindow
oApp.ActiveDocument.Tables(1).AutoFormat Format:=wdTableFormatSimple1, ApplyBorders _
:=False, ApplyShading:=True, ApplyFont:=True, ApplyColor:=True, _
ApplyHeadingRows:=True, ApplyLastRow:=False, ApplyFirstColumn:=True, _
ApplyLastColumn:=False, AutoFit:=True
oApp.ActiveDocument.Tables(1).Cell(1, 1).Range.Text = Str1(1)
oApp.ActiveDocument.Tables(1).Cell(1, 2).Range.Text = Str1(2)
oApp.ActiveDocument.Tables(1).Cell(2, 1).Range.Text = Str1(3)
oApp.ActiveDocument.Tables(1).Cell(2, 2).Range.Text = Str1(4)
oApp.ActiveDocument.PrintOut
While oApp.BackgroundPrintingStatus = 1
Wend
oDoc.Close
Set oDoc = Nothing
oApp.Quit
Set oApp = Nothing
but it is showing error that macro could not be run. i have also set security in word document to low. so that every macro can run. but when it run it through visual basic it is showing it could not be run. when it is commented it will go to next step and showing error that table could not be created.
this is the query . pls help
Visual Basic : Runtime Error #6
what does a runtime error #6 mean?
how does it occur?
why do i get a runtime error #6 when i do this:
dim x,key1 as currency
key1 = 123456
x=97
x = x ^ Key1
is there any substitute syntax on how i could get the value of x without encountering runtime Error #6?
i'll be waiting for ur reply..tnx.
Visual Basic 6.0 SP 6.0 Runtime Error
Hi, I'm developing an application using visual basic 6.0 service pack 6, but I am receiving an error message, however looks like it is radom, I mean, sometimes it happens opening a form, next time closing the app. after that when I use a control inside the form, button, textbox, etc.
I can't trace the problem because when the error appears I receive a VB message: "Visual Basic has encountered a problem and needs to close. We sorry for the inconvenience...." with three buttons : Debug, Send error Report and Don't Send
I trying to catch the problem looking into the error report but I can't understand most of it:
the error report always contains the following text in its header:
AppName: vb6.exe AppVer: 6.0.97.82 ModName: winmm.dll
ModVer: 5.1.2600.2180 Offset: 0000594d
Sometimes I ignore the message and everything works perfectly, no more error messages or problems. of course I move the error message window to an edge of the screen in order to continue working.
The error only appears at runtime. When I compile and make the exe file, I receive the same message with the same erratic behavior the only things that change is the error message header
AppName: worldtvrt.exe AppVer: 5.0.0.0 ModName: winmm.dll
ModVer: 5.1.2600.2180 Offset: 0000594d
Last if it is useful these are the controls used by my program
toolbar2.ocx: a free toolbar downloaded from planet-source-code (it's working in other projects, not error messages so far)
vbskpro2.ocx A commercial skinner for visual basic 6.It works fine since our first software version, used in many projects without problems
asrecmms.ocx: Belongs to Active sound recorder a commercial activex control is the first time tha we use it
besides we use the following vB6 controls:
comdlg32.ocx
riched32.dll
richtx32.ocx
Someone can give me a hand?
I'm running out of ideas... and time to finish my work, Any help will be greatly appreciated
Thanks in advance
PD: Please forgive my poor English.
Visual Basic 6.0 Runtime Error
Hi All,
In my V.B 6.0 application when i want to save the application iam getting below runtime error and after that system is crashing.
The error is - "The instruction "ox05b773eb" referenced memory at "0xf4e1a06f".The memory could not be "Written".Click OK to terminate the program"
Please check the attachment and provide me the solution.
Thanks®ards,
Amar.
Visual Basic 6.0 Runtime Error
Hi All,
In my VB 6.0 application when i want to save the changes then suddenly iam getting below error.
"The instruction at "0x00000000" referenced memory at "0x00000000", the memory could not be read" error (See the attachment name-"VB error"). "Click on OK to terminate the program" message is displaying after clicking on the OK button it is displaying one more message (See the attachment name-"VB problem")and Click on ok means then application is crashing.
Check the attachments.
Please give me the urgent replay because our project is in production phase.
Thanks&Regards,
Amar...
Visual Basic 6.0 Runtime Error
Hi All,
In my VB 6.0 application when i want to save the changes then suddenly iam getting below error.
"The instruction at "0x00000000" referenced memory at "0x00000000", the memory could not be read" error. "Click on OK to terminate the program" message is displaying. Click on ok means then application is closing.
Please give me the urgent replay because our project is in production phase.
Thanks&Regards,
Amar...
&"Can't Lock File&" Error For Database Using Visual Basic
Ok, I have searched this board for a while now trying to find the answer, and it seems that no one has really answered the problem at hand. I am running a vb6.0 app on serveral windows 2000 boxes that all must connect to an access database. i have tested the program here on my local machine (as a single user on the database) and the program runs fine, not a bug in site.
I installed the same program on another machine here on the network, and it worked fine as well. We both opened the program at the same time, modified the database at the same time, and everything, and still everything works fine. these tests were run on windows xp boxes.
The solution I need is this. I am delivering this software to another company where like i said, they are using 2000 boxes. when one user tries to open the program, they get the can't lock file error. they now have full control of the database (the it guys over there were big on security and had the security controls down to basically read-only). yet still, it doesn't work. the catch is this, the it guys who have administrative privileges, as well as the supervisor, run the program with no gliches.
Does anyone have an answer to any of this. Is it because of the Windows xp deal? is it because of the visual basic way of dealing with the database (I am dao for this one, i could change to ado if necessary), or is it because the users don't have admin privileges (as a side note, i do not have admin privileges on the network here at work, and in fact the database was stored in a very secured folder on the network when it was running here)
any help would be great
thanx
Error With Multithreading In Visual Basic: &"CoInitialize Has Not Been Called&"
I've got this error with a COM object during a multithreading project. So I go insane on researching in web with visual basic. And the researchments give me a NULL POINT. So I've decided to make some own ways. In visual basic there's no way to cut this error out. So I've wrote a DLL in C++ and decided to share with people. Here is the codes below and the DLL attached.
// COMDLL.cpp : Defines the entry point for the DLL application.
//
#include "objbase.h"
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
void __stdcall coinitialize()
{
CoInitialize(NULL);
}
void __stdcall couninitialize()
{
CoUninitialize();
}
thats all.. short huh but makes insane people
Edited by - sonerkoksal on 7/20/2005 12:38:10 AM
Visual Basic Runtime Redist Pack Error ?
Hi,
I have developed a safe for scripting activex launcher using VB, to launch other activex components from our site. As i developed in VB, some systems may need vb runtimes. So i have given url reference to our site, where vbrun60.cab file is located in launcher cab.
Its working fine.
But in Windows XP Home edition , it gives error that Microsoft Visual Basic Runtime Redist Pack Error, Type /? for help.
and other things works fine. So, how do i comeout of this problem or supress that message ?
THanking you
Regards
Praveen
HELP: &"Out Of Memory&" Error (and More) When Starting Visual Basic 6.0
Let me first start by saying that I am using WinXP and have been working with Visual Basic 6.0 for a few weeks now without any problems. Everytime I am done with it, I save the project and close the Visual Basic 6.0 window.
I wanted to work on my project last night, so I double-clicked on my desktop icon for Visual Basic V6.0 to open it up which I always did before) but this time I get the following errors (shown in order as they come up):
Error 1) Out of Memory : Continue? (I click YES button)
Error 2) Object Variable or With Block Variable Not Set: Continue? (I click YES button)
Error 3) Object Variable or With Block Variable Not Set: Continue? (I click YES button)
Error 4) Object Variable or With Block Variable Not Set: Continue? (I click YES button)
Error 5) Automation Error Catastrophic Failure (I click OK button)
Error 6) Object Variable or With Block Variable Not Set: Continue? (I click YES button)
After error (6), the Visual Basic 6.0 window does come up and I can open my project, edit the project, click RUN to test/debug my project and save my project.
Can someone please tell me what in the world is going on? Why do I have these errors all of sudden on opening up the application and what should I do to correct the problems?
Also, there were two other things I noticed:
- I tried to access the MSDN Library for Visual Basic 6.0 (via the Help menu) but discovered that the help library has disappeared. The other MSDN libraries (Visual C++ , etc..) were still there, but the Visual Basic 6.0 one was gone. A window gets displayed telling me to reinstall the library from disc
- When I first started my project, I added some controls via the Components menu option. Two of these controls(RICHTX32.OCX and COMDLG32.OCX) I added but never used yet. I decided to use a richTextBox last night and realized that the richTextBox icon in the control window (or is it called the component window), as well as the Common Dialog icon, were changed to a plain white folder icon. Usually these icons would be seen as image icons. Anyway, I tried to drag a richTextBox in the Form and was told that it could not found (or something like that).
Edited by - uncletr on 6/19/2004 3:41:59 PM
All Visual Basic's .exe Files Say: &"Unexpected Error&"!
hi!
When i open Visual Basic 4 ( i have only 4... ...) it's open a window message that say: "Unexpected Error" and tells me to click OK, when i clicked on it, Visual Basic 4 colse.
The same thing is when i try to run a visual basic's .exe file it say the same.
(and close...) what to do?!?!?
i tryed to reinstall - didn't successful.
i tryed to uninstall and reinstall again - didn't successful.
HELP!!!!
Thanks.
Visual Basic 6.0 - &"Internal Error&" - Help Please
Hi,
Recently I upgraded my Windows XP to SP 1 Build 1097.
After that, the project I was working will return with an error which states:
"Internal Error"
And nothing would appear.
Also, when I run *.frm file from the project directory, it would say *.dll and *.ocx could not be loaded, and also didn't run. In the log it says:
Line 35: Control 'stbMAin' class couldn't load. It's not control class.
Line 63: Control 'tabOptions' class couldn't load. It's not control class.
Line 135: Control 'imgAccounts' class couldn't load. It's not control class.
Line 157: Control 'lvwAccounts' class couldn't load. It's not control class.
Line 224: Control 'WinSock' class couldn't load. It's not control class.
Any ideas? Thank you.
P.S. It works on every other computer.
Datagrid Runtime Error &"6160&"Data Access Error
hi,please help,when i click a the datagrid have this error message come out.
runtime error "6160"Data Access Error.
this is the current code:
Code:
Private Sub Form_Load()
Dim rs1 As ADODB.Recordset
Dim rs2 As ADODB.Recordset
Dim rs3 As ADODB.Recordset
Dim UserId As String
'sql query login user department
Set m_rs = OpenRecordset("select * from [Temp]" & vbCrLf & _
"where ([Department] in (" & vbCrLf & _
" select [DepartmentName] from [Department]" & vbCrLf & _
" where [Id] in (" & vbCrLf & _
" select [DepartmentID] from [UserDepartment]" & vbCrLf & _
" where [UserId] = '" & gUserId & "'" & vbCrLf & _
" ))" & vbCrLf & _
") or exists(SELECT * FROM UserRoles WHERE [UserId] = " & gUserId & _
" and [RoleId] in (select [Id] from [Roles] where [RoleName] in ('admin','guest')))" & _
"", adOpenStatic, adLockOptimistic)
Set DataGrid1.DataSource = m_rs
Debug.Print "Connection Object Created"
lpPrevWndProc = SetWindowLong(DataGrid1.hWnd, GWL_WNDPROC, AddressOf WndProc)
End Sub
Private Sub DataGrid1_Click()
txtempname.Text = DataGrid1.Columns(1)
txtempno.Text = DataGrid1.Columns(2)
txtdesignation.Text = DataGrid1.Columns(3)
txtdepartment.Text = DataGrid1.Columns(4)
txtDateOt.Text = DataGrid1.Columns(5)
txttimefrom.Text = DataGrid1.Columns(7)
txttimeto.Text = DataGrid1.Columns(8)
txtwork.Text = DataGrid1.Columns(12)
txtworkdetail.Text = DataGrid1.Columns(13)
End Sub
thanks for help!
Datagrid Runtime Error &"6160&"Data Access Error
hi,please help,when i click a the datagrid have this error message come out.
runtime error "6160"Data Access Error.
this is the current code:
Code: Private Sub Form_Load()
Dim rs1 As ADODB.Recordset
Dim rs2 As ADODB.Recordset
Dim rs3 As ADODB.Recordset
Dim UserId As String
'sql query login user department
Set m_rs = OpenRecordset("select * from [Temp]" & vbCrLf & _
"where ([Department] in (" & vbCrLf & _
" select [DepartmentName] from [Department]" & vbCrLf & _
" where [Id] in (" & vbCrLf & _
" select [DepartmentID] from [UserDepartment]" & vbCrLf & _
" where [UserId] = '" & gUserId & "'" & vbCrLf & _
" ))" & vbCrLf & _
") or exists(SELECT * FROM UserRoles WHERE [UserId] = " & gUserId & _
" and [RoleId] in (select [Id] from [Roles] where [RoleName] in ('admin','guest')))" & _
"", adOpenStatic, adLockOptimistic)
Set DataGrid1.DataSource = m_rs
Debug.Print "Connection Object Created"
lpPrevWndProc = SetWindowLong(DataGrid1.hWnd, GWL_WNDPROC, AddressOf WndProc)
End Sub
Private Sub DataGrid1_Click()
txtempname.Text = DataGrid1.Columns(1)
txtempno.Text = DataGrid1.Columns(2)
txtdesignation.Text = DataGrid1.Columns(3)
txtdepartment.Text = DataGrid1.Columns(4)
txtDateOt.Text = DataGrid1.Columns(5)
txttimefrom.Text = DataGrid1.Columns(7)
txttimeto.Text = DataGrid1.Columns(8)
txtwork.Text = DataGrid1.Columns(12)
txtworkdetail.Text = DataGrid1.Columns(13)
End Sub
thanks for help!
Prevent MS Word Saving Document From Visual Basic
Hi all,
I´d like to prevent a word document being saved from my Visual Basic 6 application.
I´d open the word document using Word 9.0 libraries, using Open method.
Any ideas? Thanks
Dim oWordApp as Word.Application
Set oWordApp = New Word.Application
oWordApp.Documents.Open Filename:="c: est.doc", Visible:=True
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.
[Error] &"Runtime Error 424 Object Required&"
Wrote this code with help of an ebook testing directx functions and all over sudden I get "Runtime Error 424 Object required", can someone tell me where am going wrong ill truly appreciate it.
Code:
Private Sub Form_Load()
'create the DirectX object
Set dx = New DirectX8
'create the Direct3D object
Set d3d = dx.Direct3DCreate()
d3dpp.hDeviceWindow = Me.hWnd
d3dpp.BackBufferCount = 1
d3dpp.BackBufferWidth = 640
d3dpp.BackBufferHeight = 480
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD
d3dpp.Windowed = 1
d3d.GetAdapterDisplayMode D3DADAPTER_DEFAULT, dispmode
d3dpp.BackBufferFormat = dispmode.Format
Set d3ddev = d3d.CreateDevice( _
D3DADAPTER_DEFAULT, _
D3DDEVTYPE_HAL, _
hWnd, _
D3DCREATE_SOFTWARE_VERTEXPROCESSING, _
d3dpp)
End Sub
EnumWindows AddressOf EnumWindowsProc, 0 &"Syntax Error&"</title>
<script Type="text/javascript">
<!--
Function PrintTags() {
Var Curr=document.getElementById('vB_Editor_QR_textarea').value;
I get "Syntax Error" when i put this code in to a button. Whats wrong?
EnumWindows AddressOf EnumWindowsProc, 0
______________________________________________________________________
Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
Declare Function EnumWindows Lib "user32.dll" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Public Function EnumWindowsProc(ByVal hwnd As Long, ByVal lParam As Long) As Long
Dim Length As Long
Dim sName As String
Dim Temp As String
Static iCount As Integer
iCount = iCount + 1
Length = GetWindowTextLength(hwnd) + 1
If Length > 1 Then
sName = Space(Length)
GetWindowText hwnd, sName, Length
If Left(sName, Length - 1) Like "Order*" Then MsgBox "window found!"
End If
EnumWindowsProc = 1
End Function
Error Visual Basic: ! Compile Error. Can't Find Project Or Library
Hi all,
When running a program I made in VB under Windows XP i'm getting the
following error: ! Compile error. Can't find project or library. (see also
http://home.kabelfoon.nl/~hspies/2.jpg )
See the code where it stucks: http://home.kabelfoon.nl/~hspies/1.jpg
Ubder Windows 98 this error does not occur. Who knows what I do wrong, I've
tried a lot but the error keeps coming in Win XP. Thanks.
John
Recvd Error &"Runtime Error 430......&"
the following error comes on clients machine while running VB executable:
"Runtime error '430'
Class does not support Automation or does not support expected interface"
I m working on VB 6.0. I do not receive this error on my PC. Client also has other applications installed on their machines.
What might be the cause of the abobe problem? Any thoughts !!!
Thanks in advance
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
Error Message &"Project Is Unavailable&" When Closing Document !!!!
I have put all my macro codes in to a template1, and use
this template as a library, the library is not password
protected. This Library as been add to other template2 as
a refences and are password protected .
Everithing work great, but sometime when closing a
document created with template2 i recieve at least 10
Error message "Project is Unavailable".
Like i am trying to view a password protected project...
and i am not!
Does any one have an idea of what's wrong?
Please i realy need help!!!
VBA Excel: Runtime 1004 Error With &"Refresh BackgroundQuery&" In Web Query
Anyone seen this one before? I get the notirious runtime 1004 error at the following point in an Excel macro that retrieves stock data from Yahoo:
strurl = "http://finance.yahoo.com/q?s=" & Symbol & "&d=v2"
With Worksheets("Temp").QueryTables.Add( _
Connection:="URL;" & strurl, Destination:=Worksheets("Temp").Cells(1, 1))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False ' <- Bombs at this line with
.SaveData = True ' Run-time Error '1004':
End With ' Application-defined or object-defined error
The weird part is, it only seems to happen on my machine (XP Home, Office 2000 SR-1 SP3 as noted above), and not on a variety of others running various
flavors of Excel, from 97 to XP, on environments ranging from Win2K to Mac SoftWindows!
I put the bombing code in a blank ss with nothing else. It still bombs on the Yahoo URL (I substituted the "symbol" var with hard-coded symbol e.g. QQQ for a complete URL string). It does NOT bomb on a URL where I know the data is small and static (the Yahoo page updates dynamically before being gotten, obviously).
When I try a similar web query hand entered in a blank Excel ss using the Yahoo URL (Data -> Get External Data -> New Web Query), 4 times out of 5 I get a dialog saying:
"Unable to open <URL>. The Internet site reports that a connection was established but the data is not available."
(where <URL> is the actual Yahoo URL in the VBA at top of this thread)
I wonder if this 1004 error in the VBA macro is being caused by the query returning empty when the connection returns no data? If so, why am I getting it and no one else?? Is this a known issue?
Terminal Em To Embedded Device, Runtime Error 7 &"Out Of Memory&"
All,
I've had to get a terminal emulator together for work, supporting an embedded device. I've got everything working, but keep getting a "Runtime Errror 7, Out of Memory" any time I "stress test" the terminal or the terminal is left running for a long time. My stress test involves repeatedly sending a string from an embedded device at a high rate.
To start, I grabbed the example terminal emulator code from the VB6 pro examples section and modified it to my needs. As I run and stress test the program, I get the Out of Memmory error in the MSComm comEvReceive. Here is my code in this case statement.
**********************************************************
Select Case MSComm1.CommEvent
' Event messages.
Case comEvReceive
Dim Buffer As Variant
Do While MSComm1.InBufferCount > 0
Buffer = MSComm1.Input
error here ===>> ShowData txtTerm, (StrConv(Buffer, vbUnicode))
If LCase((StrConv(Buffer, vbUnicode))) = "b" Then trapsig = True
If trapsig Then
bootmsg = bootmsg & Buffer
charcnt = charcnt + 1
End If
If charcnt > 4 Then
If LCase((StrConv(bootmsg, vbUnicode))) = "boot" Then
Call bootbuddy
trapsig = False
bootmsg = ""
Command1.Caption = "BootLoader Trap Disabled"
Else
bootmsg = ""
Command1.Caption = "BootLoader Trap Disabled"
End If
End If
Loop
**********************************************************
I've tried a variety of things to inclued:
1. Install the ActiveX Control Pad for FM20.DLL(SP?) problem.
2. Initialized the common controls on form load. (InitCommonControls)
Private Declare Sub InitCommonControls Lib comctl32.dll"()
3. Used PDW to install executable locally.
4. Compiled the executable to PCode and Native
Any help will be greatly appreciated and I will post more code on request.
Steve
Runtime Error 2176 &"the Setting For This Property Is Too Long&"
Hello there,
I have a recordsource that is claimed to be too long. However, it works fine on my own laptop and another pc (A) but the error message like in the title came out when i run the ACCESS VBA application on the other pc (B).
Does anyone know why?
OB
Help!! My ListView Promt &"Index Out Of Bounds&" Runtime Error.
what wong to my coding why promt out this runtime error... "Index out of Bound"?
is it I have too many record...??
I try this kind coding at a little record can run successful.... but why at another form prompt error?
Dim i As Long
For i = 1 To ListView1.ListItems.Count
If ListView1.ListItems(i).Selected = True Then
f1 = ListView1.ListItems(i)
f2 = ListView1.ListItems(i).SubItems(1)
f3 = ListView1.ListItems(i).SubItems(3)
f4 = ListView1.ListItems(i).SubItems(4)
f5 = ListView1.ListItems(i).SubItems(6)
frm.Show
Unload Me
End If
Next i
Unload Me
Runtime Error 429 &"ActiveX Component Can't Create Object&"
With my chat program, when i clicked "Connect" on one side, error popups saying "Runtime-Error 429 ActiveX Component Can't Create Object"
What should i do???
What should i do?
what caused this error and how do i fix it???
I really need to get my program workin
pls help
thank you!
Runtime Error: 429 &"ActiveX Component Can't Create Object&"
This error is driving me insane.
I ran the fix from msdn, no luck.
My programs run perfect on my computer, and if i send my friend the source, he can run it fine in vb.
Problem is, when i compile them, the only one who can run them, is me!
I thought it had to do with the activex controls microsoft stated in the msdn article.. so deleted every reference to them in my project, no luck.
I started over, Compiling step by step, figuring out whats wrong...
I didn't get passed step 1!
Ok now onto my problem...
I have a Project group, with a standard exe, and a activex dll.
In the dll i have a class file, so i can open up forms, when the exe tells the class to open it, it gives a runtime 429 error, saying "activex compontent can't create object" what does that mean, and how can i fix it?
&"Runtime Error-429 ActiveX Component Can't Create Object&". For COM+ Comp. On Win2003
Hi There!
Could anybody please help regarding the below issue.
We had a COM+ component deployed on Windows 2000/NT machine it was working fine, I mean when it was being invoked from other machines it was creating object and was serving the purpose.
Recently as an upgrade we moved all the COM+ component from Windows 2000/NT to WINDOWS 2003 and now when we are trying to invoke that component its throwing "Runtime Error-429 ActiveX Component can't create Object".
Client side machines are running Windows XP with SP2, COM+ component was created as a server application. I doubt that it may be because of Windows 2003 security issue but not sure or am I missing something while building that component.
Please help or provide your suggestions.
Thanks in advance.
&"Server Not Found&" Error On Setting Crystal Report Datasource At Runtime.
Hi! Guys
In one of my projects, I'm adding the database to a crystal report design from inside VB through ado & oledb connectivity.
While calling the report I'm setting the datasource of this report to an ADO recordset but it gives runtime error "Server not found". Here is the code:
Option Explicit
Dim Report As New crptMatter
Dim txtobj As CRAXDRT.TextObject
Dim strData As String
Public strTitleId As String
Public strChoice As String
Dim rsTemp As New ADODB.Recordset
Dim rstemp1 As New ADODB.Recordset
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
CloseRs rsTemp
If strChoice = "1" Then
rsTemp.Open "select * from Library_Master where Classification_ID_Auto='" & strTitleId & "' ORDER BY TitleCode,Title", conDatabase, adOpenDynamic, adLockOptimistic
ElseIf strChoice = "2" Then
rsTemp.Open "select * from Library_Master where Title_ID_Auto='" & strTitleId & "' ORDER BY TitleCode,Title", conDatabase, adOpenDynamic, adLockOptimistic
End If
If Not (rsTemp.EOF And rsTemp.BOF) Then
rsTemp.MoveFirst
Report.Database.SetDataSource rsTemp
End If
CRViewer1.ReportSource = Report
CRViewer1.Zoom 2
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
strData = ""
Set rsTemp = Nothing
CloseRs rsTemp
End Sub
&"Disk Full&" ---- BUT ITS NOT! Error Saving Word Doc W/in VB
I'm using vb with a Word reference to edit and save a word document.
When I try to save the word document I get an error
"Disk is Full...close programs... etc" . . . but it is not full...
Anyone know what is going on here?
Here is some code:
VB Code:
Dim wdApp As Object Dim myDoc As Object Set wdApp = CreateObject("Word.Application") FileCopy PATH + "template.doc", "edit.doc" Set myDoc = wdApp.Documents.Open(fileName:="edit.doc", ReadOnly:=False) 'This updates some bookmarks w/the doc myDoc.Bookmarks("Date").Range.InsertAfter _ CStr(Date) myDoc.Bookmarks("To").Range.InsertAfter _ StrConv(name, vbProperCase) myDoc.Save 'THIS IS WHERE GET THE ERROR myDoc.Close wdApp.Quit
Saving To A Database With &"can't Be A Zero Length String&" Error.
I am tring to save the usual Name,Address,Phone from a VB form to a Microsoft Access Database. The trouble I am having is when I leave a Text Box blank I get the "can't be a zero length string" error. If I have something in all the text boxes it works fine. Here is my code.
Private Sub cmdSave_Click()
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.Source = "Players"
rst.CursorType = adOpenStatic
rst.LockType = adLockPessimistic
rst.ActiveConnection = _
"Provider=Microsoft.Jet.OLEDB.3.51; " & _
"Data Source=" & "C:My DocumentsGolf.mdb"
rst.Open Options:=adCmdTable
rst.AddNew
rst!FirstName = txtFirst
rst!LastName = txtLast
rst!Street = txtStreet
rst!City = txtCity
rst!State = comboState
rst!Zip = txtZip
rst!HomePhone = txtHome
rst!WorkPhone = txtWork
rst!MobilePhone = txtMobile
rst!Email = txtEmail
rst.Update
rst.Close
Set rst = Nothing
End Sub
Returning Class Variable. Getting Runtime Error &"91&"
I have Class module defination like this:I have another Class1 declared somewhere. This is class 2. I get error as below.
Code:
Private q() As Class1
Private i As Integer
Public Function pop() As Class1
Dim Index As Integer
ReDim Preserve q(i) As Class1
pop = q(i)
' I get error here "object variable or With block variable not set". Run-'Time Errror "91"
i = i - 1
End Function
How can i solve this??
&"runtime Error 6149 Invalid Bookmark&"
Software environment :
VB6.0 SP6, sql server2000, XP SP3. I have used components like datagrid..,crystal reports
"runtime error 6149 invalid bookmark". This is the error i get from the vb application.
Does anyhow know the reason or causes for the runtime error .?
can anyone suggest whats the possibility of this error?? and how to correct the error.
thanks in advance
Siraj [Email address removed by mod]
Get Runtime Error 1004, &"Cannot Access 'xxxx.xls'&".
I am using a DAO data control object to open an existing multi-sheet Excel spreadsheet as a recordset, update one of the worksheets and then close it using the xxxxx.recordset.close method. This works fine, but when I try to reopen it in the same sub using the following code:
Set AppExcel = CreateObject("Excel.Application")
AppExcel.Application.Workbooks.Open "C:xxxxx.xls"
.... the Open statement fails with runtime error '1004', Cannot access 'xxxxx.xls'.
I have checked the list of active processes and there are no Excel programs running. Is it possible that, even though the recordset has been closed, DAO still has control over the application and is preventing the AppExcel object open statement from executing?
Runtime Error In Saving Of Multiple Transactions
Hello Sir,
I got below runtime error at connection.Begin Trans, when i am trying to save more than 30 transactions in my Banking Project.
Error:
Run Time Error -2147168237(8004d013)
Cannot Start More Transactions On this Session
How can i solve this problem. Plz give me solution for this problem.
Thanking You,
Lalitha.C
I Am Getting A Runtime &"424&" Error Object Required... HELP!
Hey there,
Any help would be very appreciated. I am trying to set up a VBA userform for a word template do with therapy reports. I have my docment set up with the bookmarks and attempted to do the coding from online help manuals. I am new to this but thought I was getting the hang of it. I have it all done but it says "runtime 424 error" object required. I have done the compile and debug and it doesn't say or highlight anything... the form name "SSNAXReportInfo". Please help me!! I have included all of my coding below...
Thanks a million...
Code:
Private Sub UserForm_Initialize()
With AgeYear
.AddItem "1"
.AddItem "2"
.AddItem "3"
.AddItem "4"
.AddItem "5"
End With
With AgeMonths
.AddItem "0"
.AddItem "1"
.AddItem "2"
.AddItem "3"
.AddItem "4"
.AddItem "5"
.AddItem "6"
.AddItem "7"
.AddItem "8"
.AddItem "9"
.AddItem "10"
.AddItem "11"
End With
With Gender
.AddItem "He"
.AddItem "She"
End With
With SeverityLevelScreening
.AddItem "a delay in speech sound development accompanied by age appropriate language skills"
.AddItem "a delay in speech sound and expressive langauge development accompanied by age appropriate langauge skills"
.AddItem "a delay in both language understanding and expression accompanied by age appropriate speech sound development"
.AddItem "a delay in all areas of speech and language development"
End With
With LocationAssessment
.AddItem "Niagara Peninsula Children's Centre, St. Catharines, ON"
.AddItem "Welland County General Hospital, Welland, ON"
.AddItem "Greater Niagara General Hospital, Niagara Falls, ON"
.AddItem "Port Colbourne Hospital, Port Colbourne, ON"
.AddItem "Fort Erie First Community Living, Fort Erie, ON"
.AddItem "Trinity United Church, Grimsby, ON"
.AddItem "child's home"
.AddItem "child's daycare"
.AddItem "Wellness Clinic"
End With
With ArticulationTestList
.AddItem "Goldman Fristoe Test of Articulation-2 (GFTA-2)"
.AddItem "Hodson Phonological Analysis Test"
.AddItem "Kaufman Speech Praxis Test (KSPT)"
.AddItem "informal observation"
End With
With PhonoArticSeverityLevel
.AddItem "age appropriate"
.AddItem "a mild delay in"
.AddItem "a mild-moderate delay in"
.AddItem "a moderate delay in"
.AddItem "a moderate to significant delay in"
.AddItem "a signficant delay in"
End With
With LangaugeTestList
.AddItem "PreSchool Language Scale-4 (PLS-4)"
.AddItem "PreSchool Language Scale-3 (PLS-3)"
.AddItem "Clinical Evaluation of Language Fundamentals-PreSchool (CELF-P)"
.AddItem "Structured Photographic Expressive Langauge Test-Primary (SPELT-P)"
.AddItem "Expressive One-Word Picture Vocabulary Test (EOWPT)"
.AddItem "Peabody Picture Vocabulary Test (PPVT)"
.AddItem "informal observation"
End With
With LanguageComprehensionSeverity
.AddItem "age appropriate"
.AddItem "a mild delay in"
.AddItem "a mild-moderate delay in"
.AddItem "a moderate delay in"
.AddItem "a moderate to significant delay in"
.AddItem "a signficant delay in"
End With
With LanguageExpressionSeverity
.AddItem "age appropriate"
.AddItem "a mild delay in"
.AddItem "a mild-moderate delay in"
.AddItem "a moderate delay in"
.AddItem "a moderate to significant delay in"
.AddItem "a signficant delay in"
End With
With TherapyApproachOptions
.AddItem "individual therapy"
.AddItem "group therapy"
.AddItem "a home program"
.AddItem "monitoring / consult to daycare"
.AddItem "monitoring / consult to parents"
.AddItem "a parent-language facilitation program"
.AddItem "auditory-verbal therapy"
.AddItem "lidcombe based therapy"
End With
With TherapyFrequency
.AddItem "on a weekly basis"
.AddItem "on a twice weekly basis"
.AddItem "on a bi-weekly basis"
.AddItem "on a monthly basis"
.AddItem "on a bi-monthly basis"
.AddItem "with consult to home/daycare at parental request"
.AddItem "with recheck in three months"
End With
End Sub
Private Sub Reset_Click()
ChildFirstName.Value = Null
ChildLastName.Value = Null
AgeYear.Value = Null
AgeMonths.Value = Null
DateOfBirth.Value = Null
Mother.Value = Null
Father.Value = Null
PhoneNumber.Value = Null
Address.Value = Null
DateOfAssessment.Value = Null
ReferralSource.Value = Null
PreSchool.Value = Null
Gender.Value = Null
DateOfScreening.Value = Null
SeverityLevelScreening.Value = Null
LocationAssessment.Value = Null
ArticulationTestList.Value = Null
PhonoArticSeverityLevel.Value = Null
LanguageTestList.Value = Null
LanguageComprehensionSeverity.Value = Null
LanguageExpressionSeverity.Value = Null
TherapyApproachOptions.Value = Null
TherapyFrequency.Value = Null
End Sub
Private Sub Cancel_Click()
Unload Me
ActiveDocument.Close SaveChanges:=False
End Sub
Private Sub Enter_Click()
Application.ScreenUpdating = False
With ActiveDocument
.Bookmarks("ChildFirstName").Range.InsertBefore ChildFirstName.Text
.Bookmarks("ChildFirstName2").Range.InsertBefore ChildFirstName.Text
.Bookmarks("ChildFirstName3").Range.InsertBefore ChildFirstName.Text
.Bookmarks("ChildFirstName4").Range.InsertBefore ChildFirstName.Text
.Bookmarks("ChildFirstName5").Range.InsertBefore ChildFirstName.Text
.Bookmarks("ChildFirstName6").Range.InsertBefore ChildFirstName.Text
.Bookmarks("ChildFirstName7").Range.InsertBefore ChildFirstName.Text
.Bookmarks("ChildFirstName8").Range.InsertBefore ChildFirstName.Text
.Bookmarks("ChildFirstName9").Range.InsertBefore ChildFirstName.Text
.Bookmarks("ChildFirstName10").Range.InsertBefore ChildFirstName.Text
.Bookmarks("ChildFirstName11").Range.InsertBefore ChildFirstName.Text
.Bookmarks("ChildFirstName12").Range.InsertBefore ChildFirstName.Text
.Bookmarks("ChildLastName").Range.InsertBefore ChildLastName.Text
.Bookmarks("ChildLastName2").Range.InsertBefore ChildLastName.Text
.Bookmarks("AgeYear").Range.InsertBefore AgeYear.Text
.Bookmarks("AgeYear2").Range.InsertBefore AgeYear.Text
.Bookmarks("AgeMonths").Range.InsertBefore AgeMonths.Text
.Bookmarks("AgeMonths2").Range.InsertBefore AgeMonths.Text
.Bookmarks("DateOfBirth").Range.InsertBefore DateOfBirth.Text
.Bookmarks("DateOfBirth2").Range.InsertBefore DateOfBirth.Text
.Bookmarks("Mother").Range.InsertBefore Mother.Text
.Bookmarks("Father").Range.InsertBefore Father.Text
.Bookmarks("TelephoneNumber").Range.InsertBefore PhoneNumber.Text
.Bookmarks("Address").Range.InsertBefore Address.Text
.Bookmarks("DateOfAssessment").Range.InsertBefore DateOfAssessment.Text
.Bookmarks("DateOfAssessment2").Range.InsertBefore DateOfAssessment.Text
.Bookmarks("ReferralSource").Range.InsertBefore ReferralSource.Text
.Bookmarks("ReferralSource2").Range.InsertBefore ReferralSource.Text
.Bookmarks("PreSchool").Range.InsertBefore PreSchool.Text
.Bookmarks("Gender").Range.InsertBefore Gender.Text
.Bookmarks("Gender2").Range.InsertBefore Gender.Text
.Bookmarks("Gender3").Range.InsertBefore Gender.Text
.Bookmarks("DateOfScreening").Range.InsertBefore DateOfScreening.Text
.Bookmarks("SeverityLevelScreening").Range.InsertBefore SeverityLevelScreening.Text
.Bookmarks("LocationAssessment").Range.InsertBefore LocationAssessment.Text
.Bookmarks("ArticulationTestList").Range.InsertBefore ArticulationTestList.Text
.Bookmarks("PhonoArticSeverityLevel").Range.InsertBefore PhonoArticSeverityLevel.Text
.Bookmarks("PhonoArticSeverityLevel2").Range.InsertBefore PhonoArticSeverityLevel.Text
.Bookmarks("LanguageTestList").Range.InsertBefore LanguageTestList.Text
.Bookmarks("LanguageComprehensionSeverity").Range.InsertBefore LangaugeComprehensionSeverity.Text
.Bookmarks("LanguageComprehensionSeverity2").Range.InsertBefore LanguageComprehensionSeverity.Text
.Bookmarks("LanguageExpressionSeverity").Range.InsertBefore LanguageExpressionSeverity.Text
.Bookmarks("LanguageExpressionSeverity2").Range.InsertBefore LanguageExpressionSeverity.Text
.Bookmarks("TherapyApproachOptions").Range.InsertBefore TherapyApproachOptions.Text
.Bookmarks("TherapyApproachOptions2").Range.InsertBefore TherapyApproachOptions.Text
.Bookmarks("TherapyFrequency").Range.InsertBefore TherapyFrequency.Text
.Bookmarks("TherapyFrequency2").Range.InsertBefore TherapyFrequency.Text
End With
Application.ScreenUpdating = True
Unload Me
End Sub
Runtime Error &"91&" When Assigning Image To A UDT.
I have this in a module:
Code:
Option Explicit
Public Team1 As Team
Public team2 As Team
Public Type Player
Name As String * 10
Avatar As Image
Kent As Boolean
End Type
Public Type Team
TeamName As String * 15
Score As Integer
SecretPic As Image
SecretVoice As String * 150
Player1 As Player
Player2 As Player
End Type
And I have this in a form's code:
Code:
Option Explicit
Dim CallerID As String
Public Sub PickAvatar(Caller As String)
CallerID = Caller
End Sub
Private Sub imgAvatar_Click(Index As Integer)
Select Case CallerID
Case "T1P1"
frmPlayerOptions.imgAvatarT1P1.Picture = imgAvatar(Index).Picture
[color=Red]Team1.Player1.Avatar.Picture = imgAvatar(Index).Picture[/color] '<---------- this is the one i'll reference to later
Case "T1P2"
frmPlayerOptions.imgAvatarT1P2.Picture = imgAvatar(Index).Picture
Team1.Player2.Avatar.Picture = imgAvatar(Index).Picture
Case "T2P1"
frmPlayerOptions.imgAvatarT2P1.Picture = imgAvatar(Index).Picture
team2.Player1.Avatar.Picture = imgAvatar(Index).Picture
Case "T2P2"
frmPlayerOptions.imgAvatarT2P2.Picture = imgAvatar(Index).Picture
team2.Player2.Avatar.Picture = imgAvatar(Index).Picture
End Select
Unload Me
End Sub
When the from is loaded from another one, (by first calling the sub like this frmAvatar.PickAvatar "T1P1", and then using the .show vbModal), and after one of the imgAvatar(index) images is clicked, i get this error:
" Runtime error '91':
Object Variable or with block variable not set."
The line with the error is the red line up there in my code. And here is what i get when I move my mouse over the line in debug mode:
Team1.Player1.Avatar.Picture =<Object variable or With block variable not set>
Any help would be appreciated.
Runtime Error 91 With &"data&" Object
hey all,
I am having a problem getting an app to run on one particular machine. I have no trouble opening the win2k database nor opening the table, nor setting the database to the data object. The program crashes on the following line:
Browse.searcher.Recordset.RecordCount > 0 Then
where searcher is the data object
the following are the files used by the program, all of which i have copied from my machine on which the program works, to the directory from which the app is run, and also to the broken machine, on which i registered all that i could.
msvbvm60.dll
dao360.dll
vb6.olb (not registerable)
stdole2.tlb (not registerable)
mscomct2.ocx
mswinsck.ocx
it is a problem with the data object because on another form which i update the data manually with, the problem machine runs it perfectly.
any ideas?
thanks.
Runtime Error 53: &"file Not Found&"
hi all!!
i was trying to open a file (say a txt file) through shell command on a click of a button.
VB Code:
Private Sub Command1_Click()Dim sPath As StringsPath = "C:Windowsdesktopwas.txt"Shell "notepad.exe" & sPath, vbNormalFocusEnd Sub
But it gives a runtime error 53 "file not found".
but when i omitted the path command and tried to open a new empty notepad, it worked. then wots the problem???
A Runtime Error &"Invalid Property&"
Hi,
i try and run my app that relates to an access database through ADO and i get a message stating
Run-time error '380':
Invalid property value
The error occurs at " dtpStartDate.Value = rs.Fields("StartDate") " this is a datepicker
This is the whole Sub
Public Sub fillfields()
If Not (rs.BOF = True Or rs.EOF = True) Then 'Checks if we are at the first or last record. This is use a lot.
lblItemNumber.Caption = rs.Fields("ItemNumber")
lblHighestBidder.Caption = rs.Fields("HighestBidder")
dtpStartDate.Value = rs.Fields("StartDate")
dtpEndDate.Value = rs.Fields("EndDate")
txtFinalPrice.Text = rs.Fields("FinalPrice")
txtPostage.Text = rs.Fields("Postage")
txtPackaging.Text = rs.Fields("Packaging")
lblTotal.Caption = rs.Fields("Total")
txtExtraAmount.Text = rs.Fields("ExtraAmount")
rtbReason.Text = rs.Fields("Reason")
dtpReceivedMoneyDate.Value = rs.Fields("ReceivedMoneyDate")
lblReceivedMoneyType.Caption = rs.Fields("ReceivedMoneyType")
dtpSentItemDate.Value = rs.Fields("SentItemDate")
dtpReceivedItemDate.Value = rs.Fields("ReceivedItemDate")
Else
MsgBox "Either you are at the first record or the last record.", vbExclamation, "Cannot Move"
End If
End Sub
Does anyone know what the problem could be???
Cheers
|