Run-time error ’13’ : Type mismach

download (2)how to solve this problem, before we solve this problem we must know why this problem happen?

the problem happen because there are not match value betwen variabel type and value that fill to variable.

for example we create varible with name sum and type is double, after that we fill sum with character. when you run the application the arror will be show.

so to solve it, we make sure type of variable that we create before fill value to it.

Iklan

How To Add Items ComboBox in VB 6

download (2)In Visual Basic 6 there are many object can we use to developt program that we want to built. One of it is combobox, combobox is object that provide data as list when we click the data that we set will be show and we choose one data of much data in the list for process in the future.

So how the wat to set data in the object of combobox? Its will become the main question for us. There are 2 ways to set data in the object of combobox, here are:

First ways

  1. After you pairs the combobox on the form, move to code area and choose event that you want the data will be set, usually set data in the object set when form loaded.
  2. After that to add item you just code like this :

box.AddItem item[, index]

Note:

Box is Name of combobox that you pairs in your form

AddItem is function of this object to add item

item[, index] is name would appear in the list

 

for example :

Private Sub Form_Load ()

Combo1.AddItem "Muhamad"

Combo1.AddItem "Ade"

Combo1.AddItem "Lukmanul"

Combo1.AddItem "Hakim"

End Sub

 

Second ways

  1. If we dont want spend effort to write code, we can use the properties GUI to add item to the combobox, choose the object of combobox
  2. Looking up to properties area, usually in the right side of vb6. And search the List attribute. Like in the imagelist
  3. After that you just click that atribut and type the data want you add, enter to make sure the data entered

Why My Apache in XAMPP cant Start

downloadsometimes developer php use a internar server to developt their program, usualy they use apache in xampp. sometimes when we click butoon start apache in xampp-control the apache cant run as usual… why?

because the apache in xampp use port to run in our computer, usually the default port are 80 and 443, when the apache in xampp cant run, that cause the port has been used by  another aplication. so what can we do to solve this proplem?

there are 2 ways, are:

  1. stop another aplication that use port 80, for example : IIS (Internet Information Service) and Skype

  2. change the port of apache in xampp

change the port apache in xampp

  1. open http.conf in \xampp\apache\conf

  2. change the port in line 55 from listen 80 to listen 81

  3. restart the apache

Sort Data MSFlexGrid in VB6

download (2)MSFlexGrid is an object in vb6 to show data that we set. Data that show actually can sort if we click the every column in the MSFlexGrid Object. MSFlextGrid have an function for sort the data according the column that we click. it can ascending or descending. the function is flexSortStringAscending, flexSortGenericAscending, flexSortNumericAscending and flexSortStringDescending, flexSortGenericDescending, flexSortNumericDescending.

how to use:

example :

MSFlexGrid.sort = flexSortNumericDescending (for descending)

MSFlexGrid.sort = flexSortGenericAscending (for ascending)