Using RFID in VB6


Im back again this time i will show how to use RFID Reader in VB6 Currently im developing Loadable E-Pass System for a confidential client and i want to share some of of codes regarding RFID and VB6. These is pretty straight forward i used MSCOMM (serial library in .NET) component in order to read /write buffer connected to PC's serial/usb port. This is done by using the oncomm() event in order to read all the buffers send by the RFID interface without using the timer control. Updates: USB to RS232 converter compatible: Download and install prolific drivers. For more info please download the sample project Happy coding for Design projects, custom web and windows application, please visit



Blog Site

Facebook Fan Page


My status

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.


Submitted byAnonymous (not verified)on Sun, 01/10/2010 - 12:38

sir, there is an error HexIt = Mid$(HexIt, 1, Len(HexIt) - 1)

Public Function HexIt(stext As String) As String Dim a As Long For a = 1 To Len(stext) HexIt = HexIt & Hex$(Asc(Mid(stext, a, 1))) & Space$(1) On Error Resume Next DoEvents Next a HexIt = Mid$(HexIt, 1, Len(HexIt) - 1) End Function

gud day say we're currently working on our thesis about faculty locator using rfid.... sir.. can u help us on how to choose the right materials..???tnx..
Submitted byAnonymous (not verified)on Sun, 07/04/2010 - 00:24

In reply to by Anonymous (not verified)

ei..same tayo ng thesis..faculty locator.. real time tracking system.. pede bng malamn kung posible yun..katulad ng tinanong nyo..ngawa nuo n b?? di nmen kc alm kung yung mga mterials/devices needed eh available b here in pinas.. java ang pl n ggmitin nmen.. pag may info k moh [email protected] or [email protected] anung skul moh?? taga New era Kme.. tnx
Submitted byAnonymous (not verified)on Sun, 07/04/2010 - 21:09

In reply to by Anonymous (not verified)

possible xa. kso mhal ng materials..
Submitted byJurry Pajares (not verified)on Thu, 03/03/2016 - 12:31

In reply to by Anonymous (not verified)

hi also have the same project to develop
Submitted byumepinkieon Tue, 01/12/2010 - 01:43

do you know how to add checkboxes using visual basic and then save the item to the database? I'm so lost and not sure who to ask
Submitted byAnonymous (not verified)on Tue, 01/12/2010 - 16:54

run-time error '5', invalid procedure call or argument sir un lumlabas the if i click debug poin t po d2 sa code na to HexIt = Mid$(HexIt, 1, Len(HexIt) - 1) ano kaya kaya problem sir?when the rfid reader is connected ito un error thanks for your reply
Submitted byAnonymous (not verified)on Thu, 01/14/2010 - 19:47

after reinstalling vb6.0..ok na po un code using e-gizmo rfid reader.Thank you sir
Submitted byaslan1968on Sat, 01/30/2010 - 18:31

sir is it possible to lock the time that im getting from the windows? kc sir need ko ma lock ung time para di mabgo ung oras pag log in ng employee.. my iba pa po bang way o location san ako makakakuha ng time sa v.b proj. na hndi galing sa windows..xe iinstall ko ung program sa guest lang eh baka baguhin nung administrator ung oras po..tnx sir hope for ur reply..
Submitted byAnonymous (not verified)on Tue, 02/02/2010 - 23:15

sir..i want to ask how about to interface between RFID Reader and visual basic. how to display at the pc after RFID Reader read the RFID card? thank you..
Submitted byAnonymous (not verified)on Wed, 02/03/2010 - 00:35

sir.i want to ask for your help,how to interface between RFID Reader and VB.. i have no idea in this situation. thank you..

RFID is just like barcode readers, some are Plug and play and there are some come with drivers. In my sample program i used RFID from a local distributor and it is unsing the pc serial port. In order to communicate with the reader to VB you need the to add a component (Mscomm control).. Download the sample code and you can see the logic.

i also have download your RFID code but error occured at form load.. "PortOpen" why this is happen?
Submitted byAnonymous (not verified)on Wed, 02/10/2010 - 01:01

sir i just want to ask if your program is applicable to HID readers........
Submitted byAnonymous (not verified)on Thu, 02/18/2010 - 19:25

sir , can you tel me, hw do i interface this device with dat after reading the tag it should display tag number on vb form....plz tell d coding part. thanks
Submitted byAnonymous (not verified)on Tue, 02/23/2010 - 20:20

ung code ba na binigay mo connected agad un sa rfid device? wla na ibang gagawin?
Submitted byAnonymous (not verified)on Thu, 02/25/2010 - 15:58

SIR, I liked your code, thanks it worked for me. I trying to develop a mobile phone backup system (nokia-phone) application in vb6.0.but i've to detect,send and download data from a usb-connected phone. how can i go about this. pliz help(some source code or tutorials). Thanks in advance kimbsan send to (student)
Submitted byAnonymous (not verified)on Fri, 02/26/2010 - 18:35

Hi, Sir... I am now doing a RFID based library project using a motorola XR400 RFID reader. The communication between and the reader is using the UTP crossover cable.. The problem I facing now is that how to interface the program written with the reader? I also confuse whether using C++ or visual basic is better? Can sir help?
Submitted byAnonymous (not verified)on Thu, 09/16/2010 - 19:02

In reply to by Anonymous (not verified)

U have using Serial Port used best way the VB is better. Other comport using using C++ R. Raja
Submitted byAnonymous (not verified)on Sun, 03/07/2010 - 14:03

Private Sub MSComm1_OnComm() Dim strinput As String strinput = MSComm1.Input Text1.Text = Text1.Text & strinput strinput = MSComm1.Input ===> RUN TIME ERROR 8020 "ERROR READING FROM THE DEVICE.. waaaah!!
Submitted byAnonymous (not verified)on Tue, 05/11/2010 - 10:26

gud day poh sir can u help us or any information bout our concern balak po namin sa thesis is using rfid for the locating system.. is it possible if we will use a passive rfid for a real time locating system?? tnx ph..
Submitted byAnonymous (not verified)on Sat, 06/12/2010 - 00:56

Good day sir, My name is sean, currently i am doing my final year project on RFID reader part. I manage to use USB to Serial port converter and get the data read by hyper terminal. However, i have no idea how to link the data shown in hyperterminal to VB and store in a database either access or SQL. Can you guide me on this? Thanks
Submitted byAnonymous (not verified)on Tue, 06/22/2010 - 18:36

Good day sir. Currently po gumagawa po kmi thesis which is about RFID. Somehat similar ung concept po namin sa project na RFID system ng LTO except it's in a smaller scale(school). Currently po ung ginagamitnaming language sa pag develop ng system is php at ung database namen is mySQL. Ask lang po ako sana kung ano po ung mas preferable na programming language na programming language? or di kaya po anu po ung pwede namen gawin pra ma register ung aquired data papunta sa database?
Submitted byAnonymous (not verified)on Tue, 07/13/2010 - 23:43

Gud day sir. Mgkano po kea ang isang set ng rfid reader + cards/tags sa e-gizmo. At may hrdware p po bng kelangan para makpg interface k sa pc...mgkno dn kea un.? Tnx in advance.
Submitted byAnonymous (not verified)on Wed, 08/04/2010 - 12:09

how to reader Number tag RFID??

Add new comment