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
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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!
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
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
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
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?
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
Runtime Error " Record Is Too Large"
i need help
iam getting error msg like this " Run-Time Error '- 2147467249 (800004005) '
Record is too large
my program is i am taking a backup of all the tables from my oracle database to the Access database . except 2 tables all other tables are copied to my Access database, for that 2 tables i am getting this error message
" Run-Time Error '- 2147467249 (800004005) '
Record is too large
actually the content of that 2 tables is little when we compare to the other table ... i dont know why iam getting this error msg
Edited by - AbbydonKrafts on 10/31/2006 7:42:53 AM
Runtime Error "class Does Not Support..."
"Class does not support automation or does not support expected interface"
I've double checked that the correct dll is being referenced, so thats not the problem, plus it works fine on my machine. On a win98 and a win2k that I've tried so far I get the above error.
Any ideas? I installed the dll with PDW so all files should be present on the users machines.....
Only thing , my olepro32.dll is newer than the ones on those machines......could that be a problem?
"Runtime Error 53" When Installing My VB Program.
Hi, there
I always use "Package & Deployment Wizard" to make the installation
program for my VB program. After the package is created, I would try to run
the setup.exe on a clean PC (a PC without VB installed) to see how it
works. Sometime, after I choose the directory where the program will be
installed, an error message pops up: "Runtime Error 53: file not found" and
the installation program is then terminated automatically. But, this
problem does not happen on all the "clean" PCs. I once tried to install a
VB program on "clean" PC A, and the error occurred. Then I switched to
"clean" PC B, and the program was installed successfully. Therefore, I just
can't figure out where the problem lies. Is it in the package generated by
the "Package & Deployment Wizard" or in the specific target PC? Please help
and thanks in advance...
"Wait" Bug In VB6 And Runtime Error
Hi all,
"Wait" Bug
---------------------
I am using VB6 with SP6 installed.
When I run the code from the compiler it doesnt work as expected, it ends up executing code I didnt tell it to. However if I add a message box to the end of the sub/function it works exactly as it should.
If I remove that message box and create a breakpoint in a function that gets executed and step through the code using F8 it works as expected.
I can only put this down to a bug in VB.
It occurs everytime I open a new form, get that form to do something then close the new form and return back to the first form.
Generally the code/algorithm I use to do this is as follows:
Set global variable to equal a command or mode I want the new form to do or go into eg. gstFormToFormText = "Add" (this line instructs the form to go to Add mode)
Form2.show 1
'If I add message box here it works correctly
In the new form in form_activate I have the code
If gstFormToFormText = "Add" Then
Call AddMode
Else
......
End If
On the save_click event on the new form after I save the data to the DB I have
If gstFormToFormText = "Add" Then
Unload Me
Else
.......
End If
I have compiled the code into an exe and it does not work as expected.
I have tried making it call doevents and making it sleep for a few seconds
I have posted this problem on another forum: http://phorums.com.au/showthread.php?t=150573
Anyone have any ideas?
Runtime Error
----------------
I have now gotten to a point where I have written version 0.1 of the program and am ready to do some testing on another machine.
I complied the code and get an cab and setup program. I run the setup on another machine.
When I run the code it looks fine, when I start to use the program on one of the functions I get the error: "Runtime error 5 Invalid procedure call or argument"
When I run the setup on my development machine it works fine.
the error message doesnt give me more info about what procedure it is trying to call or what arguments it is passing.
Any ideas?
thanks
Runtime Error "6" Over Flow
When i click on MRange i get a runtime error.....does anyone know why?
VB Code:
Private Sub CSNR_Click() N1 = (1.38 * (10 ^ -23)) * TempR.Text * BW.Text N2 = (1.38 * (10 ^ -23)) * TempA.Text * BW.Text NP = N1 + N2 wave = (3 * 10 ^ 8) / Freq.Text SP = TP.Text * TG.Text * RAG.Text * ((wave / (4 * 3.14159 * Dist.Text)) ^ 2) SNR.Text = SP / NPEnd Sub Private Sub RAGdB_Change()RAG.Text = 10 ^ (RAGdB / 10)End SubPrivate Sub TAGdB_Change() Dim TG As Variant TG = CDec(27) Dim TAGdB As Variant TAGdB = CDec(27)TG.Text = 10 ^ (TAGdB / 10)End SubPrivate Sub MRange_Click() Dim SP As Variant SP = CDec(27) Dim NP As Variant NP = CDec(27) Dim WL As Variant WL = CDec(27) Dim N1 As Variant N1 = CDec(27) Dim N2 As Variant N2 = CDec(27)CMR.Text = WL / (4 * 3.14159 * (Sqr(NP * SNR / (TP.Text * TG.Text * RAG.Text))))End Sub
It says the problem is with the 2nd from last line
VB Code:
CMR.Text = WL / (4 * 3.14159 * (Sqr(NP * SNR / (TP.Text * TG.Text * RAG.Text))))
Runtime-Error "Address In Use"
After i run my chat program once , and i tried to run it again a runtime error popsup saying "Address in use". And i have to reboot the system to be able to run the program again. Why is that and how to fix it?
thanx!
Runtime Error "20728": E
Have anyone encounter this kind of error message?
I package my VB application with reports developed using Crystal Report
ver.11.0. When installed on client PC, everything works fine except when
click on the report button I got the above mentioned error message. I've
checked all the dll and was there. What could have missing out? Please
help need to installed for clients soon .. Your help will be very
much appreciated.
Thank you very much & Regards.
Lucy
Most Urgent "Runtime Error 713"
Hello All,
I have developed an VB6 application, I use ADO, Jet 4.0 OLE DB Provider. (I don't use ODBC Driver). I developed the application with XP pro. and the user has XP Home.
He uses Access 2003 and I used visdata manager. I created installation package using Visual studio Installer. The user says, he gets "run time error 713" when he tries to open the application.
I don't use crystal report , data report in my application.
I tried an installation package with Visual basic Package and deployment wizard, it says some system files to be updated when i try to install in another XP machine, and it does not update it. I could not install at all.
Any idea? How can I fix the problem and what is the right way to provide an installation to user.
It's most urget. Any idea?
Thanks
A Stupid Problem: "Error Accessing The System Registry" ("Solved") Thank You
This is a very silly problem. I tried to have a look of References from Project dropdown menu, it returned a critical error:
"Error Accessing the system registry".
I reinstalled VB6 but it seems that the problem still exists. Anybody please tell me how to solve the problem.
thanks in advance
Edited by - kenyiwei on 5/6/2004 2:07:51 AM
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
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
"Type Mismatch"/"Invalid Qualifier" Error
Hi all
Am just using VB6 for the first time. Am connecting to a SQL Server 2000 database. What i am trying to do is simple select a single cell from the database into a string variable and then hold onto that variable for as long as i need it. The problem is that when i go to put the value into the variable i get a "Type Mismatch" error or an "Invalid Qualifier" error
The global variable that i am using:
Dim conn as new ADODB.Connection
Dim cmd as new ADODB.Command
Dim tempString as String
The connection string that i am using is:
conn.open "UID=;pwd=;Database=Marts;" & _
"Server=localhost;Driver={SQL Server};
The statement that i am executing is:
cmd.ActiveConnection = conn
cmd.commandType = adCmdText
cmd.commandText = "Select ColumnA from TableA where ColumnB = 'ABC'"
tempString = cmd.Execute
Vista Error: "program Is Not Working" And App "has Run Out Of Time"
Client is running my vb6 app on Vista (in XP compatibility mode), and is getting an error that indicates the app "has run out of time and shuts the program down" (her words). This happens in a very specific section of the pgm that no xp machines report errors in.
Separately, on (attempted) startup, she gets the message that the app "has stopped working, where Windows will close the program and notify me later if a solution is available." But the solution is "as easy as allowing the program to close then re-opening it back up"
Help!?
Runtime Error "0"
I've written a simple Winsock server-type program. It works fine on my XP laptop compiled and inside VB6. I've used the package and deployment wizzard to make a setup file.
The setup file runs on my Windows 2000 Advanced Server and says that the files are out of date on the server and offers to update them. "OK" I say. Then it reboots the server but once again complains that the files are out of date on the server.
I switched to another install program (Inno Setup compiler) and I think I've included all the necessary files. The setup program installs the files but when I run the program it says " Runtime Error '0' "
Akkkk!!! Any ideas on how to get the deployment wizzard to work on Windows 2000 (yes, I'm logged in as administrator)? Or what the heck a runtime error 0 might be?
Many thanks for any help.
Bob
"Runtime Error 5" --> Need Some Help
man I've been on these forums a lot... wish i could figure this stuff out myself. Anyways the question:
"Runtime Error 5... Invalid procedure call or argument"
-> The program works on my computer, however on a friends computer this is the error that comes up.
However i'm pretty sure it's not a dll or ocx problem, and so now i can't think of what it could be.
Thanks
"Runtime Error 429" - VB6 And CR9
First off, I've searched for this (and another, similar error - but I've since redone that project to this one), and tried to look in the Runtime.chm file, but it's very vague. The only thing I got out of it is that, "Some setups require certain files depending on how you're using it...".
This is what I've done. I made a small application - virtually an upgrade from an application used for CR v8.5 that just loads a report and prints it without a print prompt, and only changed the reference. This, of course, works on my machine (has Crystal 9 - development machine). It used to work on client machines with Crystal v8.5, but, even though they have the Crystal 9 Reader, it doesn't work.
Code:
Option Explicit
Dim Application As CRAXDRT.Application
Dim Report As CRAXDRT.Report
Private Sub Form_Load()
Set Application = CreateObject("CrystalRuntime.Application")
Set Report = Application.OpenReport("\someNetworkmyReport1.rpt")
Report.PrintOut (False)
Set Report = Nothing
Set Report = Application.OpenReport("\someNetworkmyReport1.rpt")
Report.PrintOut (False)
'CrystalReport1.PrintReport
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set Application = Nothing
Set Report = Nothing
End Sub
It'll even say the same thing if I run it from our Crystal RAS server. So, I'm not sure what's going on, or what to do. I'm not sure which dlls to put on the client machine (While staying within the liscense - just enough for developers).
I've read about an installer, but this is just VB6 plain - no Visual Studio.
Edited by - mdprogrammer on 6/13/2006 10:36:17 AM
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.
"Run-time Error 424 - Object Required" Error When Upgrading A Activex Control
When I compile (upgrade) a activex control the program using it gives an error saying "Run-time error '424' - Object Required". If you delete the object from the vbp file and reopens the program and add the component again it'll work just fine.. But as soon as I try to upgrade this error will occur when trying to see the form of the new project using the upgraded activex control. The upgrade procedure seems to work fine though and the error occurs, as I said, only when I try to see the form of the project.
"Run-Time Error '28':" "Out Of Stack Space"
Ok, I know the cause of this issue is one sub calling another, repeaditly. It runs about 3400 loops before crashing, but is not infinite. I was wondering if anyone knew a way to clear the stack during it's run.
Error In Running A Screen Saver "Run-time Error '6' Overflow"
Im running the program screen saver but i receiving this error its says Run-time error '6' Overflow i hope anyone could fix this thanks ...
VB Code:
Private Sub Form_Load()Dim res 'I made this array to translate name of day to Indonesia 'language. You can change this array elemen to your 'country language. Start from Sunday... aHari = Array("Sunday", "Monday", "Tuesday", "Wednesday", _ "Thursday", "Friday", "Saturday") sHari = aHari(Abs(Weekday(Date) - 1)) frmMain.Caption = "LOGIN PROGRAM Versi 1.0" frmMain.Timer1.Enabled = False Timer1.Enabled = True DoEvents Label1.Caption = "" & sHari & ", " _ & Format(Date, "mmmm dd yyyy") Label2.Caption = Format(Time, "hh:mm:ss") DoEvents App.HelpFile = "" res = SetWindowPos(frmScreenSaver.hWnd, _ HWND_TOPMOST, 0, 0, 0, 0, _ flags)End Sub
But its only highlightened at
VB Code:
App.HelpFile = ""res = SetWindowPos(frmScreenSaver.hWnd, _ HWND_TOPMOST, 0, 0, 0, 0, _ flags)
Any Ideas Why This Brings Up A "Compile Error- Argument Not Optional" Error?
Any ideas why this brings up a "Compile error- Argument not optional" error?
The Declares are:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hWnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hWnd As Long, ByVal lpString As String) As Long
Private Declare Function BringWindowToTop Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_SETTEXT = &HC
Problem code:
Private Sub Command3_Click()
Call PutTextIntoNotepad
End Sub
Private Sub PutTextIntoNotepad(hWnd As Long)
'This adds text to notepad, by locating its
''Edit' class window. This is similar to the
'method used to locate the hwnd itself, but
'here we know the parent (hWnd) so only
'have to search its child windows.
Dim hWndChild As Long
Dim sMsg As String
Dim sBuffer As String * 32
Dim nSize As Long
'this string is split only to fit the browser window
sMsg = "This method demonstrates using SendMessage()"
'get the first child window in Notepad
hWndChild = GetWindow(hWnd, GW_CHILD)
'hwndchild will = 0 when no more child windows are found
Do While hWndChild <> 0
'get the Class Name of the window
nSize = GetClassName(hWndChild, sBuffer, 32)
'if nSize > 0, it contains the length
'of the class name retrieved
If nSize Then
'if the class name is "Edit",
'set some text and exit
If Left$(sBuffer, nSize) = "Edit" Then
Call SendMessage(hWndChild, WM_SETTEXT, 0&, ByVal sMsg)
Exit Sub
End If
End If
'not found, so get the next hwnd
hWndChild = GetWindow(hWndChild, GW_HWNDNEXT)
Loop
End Sub
Thanks for the help, guys!
Daniel Christie
"On Error GoTo DoSomething_Error" Returns Error 0.. What Is Error 0??
Hello, I have a try/catch function is always is cought with an error0... What is an Error 0?
here is my code:
Code:
Private Sub ProcessCreditCard_Timer()
Dim CCstatus As String
Dim racAuthCard As Variant
Set racAuthCard = CreateObject("RACAuthcreditcard.Authcreditcard")
racAuthCard.transactionKey = "asdfasdfasfffff"
racAuthCard.login = "asfdsad"
racAuthCard.transactionType = "AUTH_CAPTURE"
Question = "Processing Credit Card Now. Please Standby."
On Error GoTo DoSomething_Error
CCstatus = racAuthCard.Authcreditcard(Total, CCnumber, ExpMonth, ExpYear, CCFirstName, CCLastName)
ProcessCreditCard.Enabled = False
If CCstatus = "This transaction has been approved." Then
Question = "Credit card transaction approved. One moment."
CCnumber = Right(CCnumber, 4)
Paidby = "Credit Card"
Call Thankyou
ElseIf CCstatus = "Problem! reason: The credit card number is invalid." Then
'CCnumber = Right(CCnumber, 4)
CCnumber = "0"
Question = "Credit Number invalid or NSF. Press the Start button to start again."
ElseIf CCstatus = "(TESTMODE) This transaction has been approved." Then
CCnumber = "TESTMODE" 'Right(CCnumber, 4)
Paidby = "TESTMODE"
Call Thankyou
Else
'CCnumber = Right(CCnumber, 4)
CCnumber = "0"
Question = "Authentication channel not found. Please try again in 30 seconds."
End If
Exit Sub
DoSomething_Error:
Select Case Err.Number
Case -2147012889 'cannot resolve DN
'MsgBox ("cnrdn")
CreditCardAuthRetry = CreditCardAuthRetry + 1
'Command1.Caption = CreditCardAuthRetry
If CreditCardAuthRetry > 100 Then
ProcessCreditCard.Enabled = False 'try for 1 second
Question = "Authentication channel not found. Please try again in 30 seconds."
End If
Case 0
'This is to catch all successful Credit Card Processes.. so it doesn't go to else
Case Else
'MsgBox ("Sorry we are having technical difficulties")
'email me the error number
ProcessCreditCard.Enabled = False
CCnumber = "0"
Question = "I am sorry, but we cannot take credit cards right now. "
'Call ClearAll
End Select
End Sub
and I know the credit card processing goes through fine (I can login to my merchant account and see it)...
what does an Error 0 mean, should I be worried? I basically setup my catch statement to ignore an error 0 .. but i want to know if that is a good idea .. or if i can "fix" this issue?
thanks!
Lee
|