Question about Microsoft Visual Basic 6.0 for PC

1 Answer

Program not working

I click on my command button on VB and a error message came up saying Type mismatch and highlighted the private sub part

Posted by on

  • Stephen McGloughlin
    Stephen McGloughlin May 11, 2010

    Can't answer your question without more info. Post your code here and give the precise text or a screenshot of the error and any line numbers it may point to, and I'm sure we can find an answer for you. Without seeing your code we cannot evaluate it and determine where it is broken.


1 Answer

  • Level 1:

    An expert who has achieved level 1.


    An expert who has answered 20 questions.


    An expert that hasĀ over 10 points.


    An expert whose answer gotĀ voted for 2 times.

  • Contributor
  • 46 Answers

Type mismatch is caused by trying to use a variable defeined as one type to store another type of data. For example a variable that is integer but you try to set it to a letter.
In this can be caused by a line like this:
when it should be
see if you have that sort of mistake.

Posted on Aug 28, 2009

1 Suggested Answer

  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%


Complete. Click "Add" to insert your video. Add



Related Questions:

1 Answer

Private sub cmdEdit_click ( ) what is the right code to work the edit buton

You will probably want to be able to update some value of some field when doing database programming. This is done with Edit and Update. We will try to change the value of the "Phone" field by editing the text in the text box and clicking a button.
Put a command button on the form and name it "cmdUpdate". Then copy the following code to the project.
Private Sub cmdUpdate_Click()

rsMyRS!Phone = txtPhone.Text

End Sub
Could it be that simple? Yes. This changes the phone number of our selected person. Or to put it technically: This changes the value of the "Phone" field of our current record. Imagine the current record being a set of boxes, with a field in each box. T he Edit method takes the lid off all of the boxes and Update puts them back on. When we write rsMyRS!Phone = txtPhone.Text we replace the content of the "Phone" box with the content in the text box.

Dec 16, 2010 | Microsoft Visual Basic 6.0 for PC

1 Answer

How to disable command button in visual basic

  • tep 1 Open Visual Basic and select "Standard Exe" to create a new project.
  • Step 2 Add a button by clicking the square button tool on the right, and then clicking and dragging in the main window.
  • Step 3 Click the button once to open the "Properties" window on the right. Select the "(Name)" property, and type "myCmdButton" as the name.
  • Step 4 Double-click the button to open up the code-view window. Type the following in the white space under "Private Sub myCmdButton_Click()":
    myCmdButton.enabled = False;
  • Step 5 Click the blue "Run" button on the top toolbar of Visual Basic. Because you set enabled to "false" in the previous step, you will see your button grayed out, and nothing will happen when you click it.
  • Jul 07, 2010 | Microsoft Computers & Internet

    1 Answer

    What does Dim, Try , Me , Private Sub means in Visual Basic

    Dim allows you to declare a variable. It is short for "Dimension", and is an old old keyword. For example if you want to declare a variable called i that can hold an integer you would write:
    Dim i As Integer
    The Try keyword is used to allow you catch errors when they occur. If you didn't catch them, they would cause the program to end with an error report.
    Try ' Code goes in here that might throw an error Catch Ex As Exception ' Code goes here to deal with any error End Try
    The Me keyword refers to the current instance of the class in which the word appears. For example if the class is called Form1, then Me allows you to refer to the current instance of the class when the code is running.
    Private Sub is formed from two Keywords. Private is an "Access modifier". When applied to a Sub it means that the Sub would not be visible outside the class. Sub is short for "Subroutine". A subroutine is a section of code that performs some useful function that you might want to run many times. For example you might want to do something whenever a button is clicked, and so you would write a subroutine with code in that will run whenever the button is clicked.
    It would be better to ask programming questions in a visual basic forum. There are many on the internet. Search the internet for "visual basic forum". Also note that when you are using Visual Studio 2005, you can press the F1 key when you have placed the cursor in a word that you do not understand, and it will open the help and the relevant page.
    These terms are very very difficult to understand when you have never programmed before. Usually it is best to take a lot of it on faith, and move on through the book or example that you are following without completely understanding it all. Over time, with practice, repetition and perseverance you will start to develop an understanding of the underlying concepts. They are hard to explain and hard to learn.

    Jun 06, 2010 | Microsoft Visual Studio 2005 Standard...

    1 Answer

    Can you make an internet browser with microsoft visual basic 2008?

    yes you can below you have one option:
    Create a new project, and then go to "Project" on the menu.
    Click components as shown in the following image.
    Find the component "Microsoft Internet Controls," check it, and click "Apply" and then "Close."
    Click the icon that was just added in the tools window, and draw a large sized window with it. This is going to be where you view webpages through your browser, so don't make it small, but leave room for buttons and other accessories.
    Make a textbox, this will be your URL bar where you type in the address of the website you want to see.
    Make four command buttons, these are going to be your Go, Back, Forward, and Refresh buttons, change the captions accordingly, and name each of them Cmdgo, Cmdback, CmdForward, and CmdRefresh.
    Now, here's the coding part. This is all it takes to make your webbrowser working:
    Private Sub cmdback_Click()
    End Sub
    Makes the back button go backwards, pretty much self explanatory:
    Private Sub Cmdforward_Click()
    End Sub
    Same concept, except this time the webbrowser goes forward:
    Private Sub cmdgo_Click()
    WebBrowser1.Navigate (Text1.Text)
    End Sub
    Makes your webbrowser go to the URL in your text box:
    Private Sub cmdrefresh_Click()
    End Sub
    Makes your web browser refresh:
    Private Sub Form_Load()
    WebBrowser1.Navigate ("")
    End Sub
    The URL shows your homepage, change it to or whatever your usual homepage you would like to be.
    Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
    Text1.Text = (WebBrowser1.LocationURL)
    Form1.Caption = (WebBrowser1.LocationName)
    End Sub

    Jan 15, 2010 | Computers & Internet

    2 Answers

    What is a error C2563: mismatch in formal parameter list in c++ language

    ok, look at the following example

    void Run(string* message, char& type)

    in the program I put


    this will result in the mismatch error as there are two parameters not one.


    Oct 28, 2009 | Microsoft Visual Studio 2008 Professional...

    1 Answer

    Vb 6.0 to oracle connectivity problem

    Your SQL query does not look valid. Test the query in SQL Query analyzer, and then once it is working, copy it into your VB source. You will of course then need to make the query a string that VB will accept.

    Mar 23, 2009 | Microsoft Computers & Internet

    1 Answer

    How do i use date in visual basic 6


    I am not getting your problem clearly.
    If you are referring to save the input dates as date in database with the help of sql query then you need to provide hash(#) mark at the beginning and end of date values. It will resolve your problem.

    Hope this helps and let me know if you are not getting the solution clearly.


    Mar 06, 2009 | Microsoft Visual Basic 6.0 for PC

    1 Answer

    Type mismatch in MSFlexGrid Control

    type mismatch error occours when there is a mismatch between the value which you are trying to assign to a variable which is dimensioned to store values of another, first you check if the datatypes match each other by applying the break.

    Dec 19, 2008 | Microsoft Visual Basic 6.0 for PC

    2 Answers

    About guidence

    i still not solved the problem

    Apr 18, 2008 | Computers & Internet

    Not finding what you are looking for?
    Microsoft Visual Basic 6.0 for PC Logo

    Related Topics:

    107 people viewed this question

    Ask a Question

    Usually answered in minutes!

    Top Microsoft Computers & Internet Experts

    micky dee

    Level 3 Expert

    2635 Answers

    Les Dickinson
    Les Dickinson

    Level 3 Expert

    18333 Answers

    Brian Sullivan
    Brian Sullivan

    Level 3 Expert

    27725 Answers

    Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

    Answer questions

    Manuals & User Guides