Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Visual Basic 2005 Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics 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 March 14th, 2007, 07:12 PM
Registered User
 
Join Date: Mar 2007
Location: redlands, ca, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default runtime error '13' type mismatch

This is my first error of this type I am new to VB6 and trying to get a racecar program for the pinewood derby to work.
The problem is in this line:
RaceMode = GetSetting("DownHillDash", "Main", "TimerType")


End With
    lblLane1Name.Caption = GetSetting("DownHillDash", "Main", "Lane1Name")
    lblLane2Name.Caption = GetSetting("DownHillDash", "Main", "Lane2Name")
    lblLane3Name.Caption = GetSetting("DownHillDash", "Main", "Lane3Name")
    lblLane4Name.Caption = GetSetting("DownHillDash", "Main", "Lane4Name")
RaceMode = GetSetting("DownHillDash", "Main", "TimerType")
    ReadyToRace = False

Any help greatly appreciated.
Mike
Reply With Quote
  #2 (permalink)  
Old March 14th, 2007, 08:09 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Is RaceMode an object or a type? It seems that GetSetting is a function that returns a string, am I correct??

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
Reply With Quote
  #3 (permalink)  
Old March 14th, 2007, 08:55 PM
Registered User
 
Join Date: Mar 2007
Location: redlands, ca, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I believe that it is a type. and returns a string. When I hilight it it shows: timertype=empty
Thanks

Reply With Quote
  #4 (permalink)  
Old March 15th, 2007, 05:28 PM
Registered User
 
Join Date: Mar 2007
Location: redlands, ca, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found race mode and it is an integer:
Public RaceMode As Integer

Thanks,

Mike

Reply With Quote
  #5 (permalink)  
Old March 15th, 2007, 05:39 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

But getsetting returns a string? Have you tried casting the return value of GetSetting to an integer? Is the function returning a numerical value that can even be cast?

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
Reply With Quote
  #6 (permalink)  
Old March 15th, 2007, 10:28 PM
Registered User
 
Join Date: Mar 2007
Location: redlands, ca, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It seems that This fixed it:
RaceMode = GetSetting("DownHillDash.mdb", "Main", "TimerType", "0")
I found a help file that said getsetting must have this type order to work.
My new problem is:[Microsoft][ODBC MicrosoftAccess Driver]Could not find the file unknown
 Main.RaceObject.Initialize (cmbGroupList.ItemData(cmbGroupList.ListIndex))

Any help appreciated.

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
Why am I getting Runtime Error 13: Type Mismatch? dan_thorman Excel VBA 1 January 24th, 2007 02:06 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 12:47 AM.


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