Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 24th, 2007, 01:55 PM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Why am I getting Runtime Error 13: Type Mismatch?

In a database class I have, i declare that the Connection method should receive a parameter of type string:

Public Sub Connect(sDB As String)

When i go to call that method, i pass a string to it:

Public ActDB As New DatabaseClass

Dim dealToFas As Integer, databaseConnection As String
databaseConnection = "dq"
ActDB.Connect (databaseConnection)

However, the line "ActDB.Connect (databaseConnection)"
is returning the Runtime Error 13, and I cannot figure out why. Can anyone please point out what is certain to be my stupid mistake?

Thanks in advance


Reply With Quote
  #2 (permalink)  
Old January 24th, 2007, 02:06 PM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Figured it out. As it turns out, the database path i was trying to connect to was returning the error, but this was VB's way of representing a database connection error.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting runtime error 13: type mismatch rita9 Beginning VB 6 2 March 14th, 2008 04:36 AM
hi i got runtime error 13 Type Mismatch error sriharsha345 Access VBA 2 February 21st, 2008 09:30 AM
runtime error '13' type mismatch denkidude Visual Basic 2005 Basics 5 March 15th, 2007 10:28 PM
Runtime Error 13: Type Mismatch in VB6 migzheart Access VBA 1 December 28th, 2005 07:54 AM
Error 13 Type Mismatch lguzman Access VBA 2 January 6th, 2005 10:19 PM



All times are GMT -4. The time now is 04:09 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.