473,473 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

VB6 Run time error '13' Type Mismatch

rhitam30111985
112 New Member
HI all ,


I am using Windows 2000 OS for out server . We use a VB tool to deploy all the COM applications. In that , this is a snippet of code that is failing :

Expand|Select|Wrap|Line Numbers
  1.  
  2. Option Explicit
  3. Dim ComAdm As New COMAdmin.COMAdminCatalog
  4. Set ComAdm = CreateObject("COMAdmin.COMAdminCatalog")
  5.  
At this point , the program just throws an exception "Type mismatch" and comes out .

I have searched google for this but cant seem to find the appropriate answer .

Any ideas ?

Regards ,

Rhitam
Jan 30 '09 #1
2 11339
shrimant
48 New Member
@rhitam30111985
Either Use
Dim ComAdm As New COMAdmin.COMAdminCatalog
Or
Set ComAdm = CreateObject("COMAdmin.COMAdminCatalog")

You cannot use both on the same variable, the first statement is an early binding and the second statement is an late binding, since the same variable is early binded, you cannot use is for late.
Feb 19 '09 #2
rhitam30111985
112 New Member
Hi ,

Sorry to post to this thread so late but this is the way it has been instructed to use in the MSDN site :

http://msdn.microsoft.com/en-us/libr...42(VS.85).aspx

Is it because of the option explicit statement on the top or does the "new" keyword make a difference?
Mar 17 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Mike | last post by:
I am trying to use the bulk insert command but I am getting the following error: ---Begin Error Msg--- Server: Msg 4867, Level 16, State 1, Line 1 Bulk insert data conversion error (overflow)...
4
by: Mike | last post by:
I am getting a type mismatch error when I do a bulk insert. ---Begin Error Msg--- Server: Msg 4864, Level 16, State 1, Line 1 Bulk insert data conversion error (type mismatch) for row 1, column...
2
by: JingleBEV | last post by:
Hi, Iam coding data access application with database object and recordset. Here' s my code '------------------------------------------------------------------ Private Function CreateRecordSet()...
2
by: Galina | last post by:
Hello All of a sudden I started getting error 13, type mismatch in a command, which was running happily for years. Here is a code: Option Compare Database Option Explicit Dim CmdClose1_Clicked...
19
by: Steve | last post by:
ASP error number 13 - Type mismatch with SELECT...FOR UPDATE statement I got ASP error number 13 when I use the SELECT...FOR UPDATE statement as below. However, if I use SELECT statement without...
2
by: mujaqo | last post by:
I have a table consist of two fields UserID and Password, and a form with unbounded fields txtUserID and txtPassword. I’m running the below code on MS Access 2000 and I’m getting Run-time error...
2
by: skundu | last post by:
Hi, I have just joined. I am getting a message when I am running a macro - run time error '13', type mismatch. when I am debuggung it it opens up my VBA code and shows this: Sub Updategraph()...
9
by: sara | last post by:
Hi - I have code (below) that ran as recently as Monday. We decided to change the location for the output reports, and now the code errors (13 Type Mismatch) on the query. The query runs fine...
4
by: JFKJr | last post by:
Hello everyone, the following code is working fine for the first time when I run it and giving "Run-time error '13': Type mismatch" at line #15 during the second time and so on.... The code is...
1
by: Greg (codepug | last post by:
Solution Note: I am experimenting with an excellent popup calendar I found on the Allen Browne web site. I was receiving the following error (Error 13: Type mismatch) when clicking a button...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.