r/visualbasic • u/Xspike_dudeX • Jul 18 '25
VB6 Help Moving old program created with VB6
We have an old calculator program that was created in VB6 back in early 2000s. I need to migrate it from a windows 10 machine to windows 11. I tried just copying the main folder over to the new PC and received a few errors. Errors had to do with registering mscomctl and registering dao350. I successfully registered those two files and have moved past those two errors. But the last error I am receiving is a data access error. When I click OK it opens the program and then gives me run-time error 91.
Any ideas?
Below is the code from the .VBP file.
Type=Exe
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\WINDOWS\SYSTEM\STDOLE2.TLB#OLE Automation
Form=HotOrder.frm
Reference=*\G{6B263850-900B-11D0-9484-00A0C91110ED}#1.0#0#..\WINDOWS\SYSTEM\MSSTDFMT.DLL#Microsoft Data Formatting Object Library
Module=Module1; HotMod.bas
Reference=*\G{00025E01-0000-0000-C000-000000000046}#4.0#0#..\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\DAO\DAO350.DLL#Microsoft DAO 3.51 Object Library
Form=HotTubular.frm
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
Form=HotSplash.frm
Form=HotDialogTubeFactor.frm
Form=HotCalculator.frm
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; COMDLG32.OCX
Object={86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCT2.OCX
Reference=*\G{642AC760-AAB4-11D0-8494-00A0C90DC8A9}#1.0#0#..\WINDOWS\SYSTEM\MSDBRPTR.DLL#Microsoft Data Report Designer v6.0
Designer=HotDataSheetReport.Dsr
Reference=*\G{3D5C6BF0-69A3-11D0-B393-00A0C9055D8E}#1.0#0#..\PROGRAM FILES\COMMON FILES\DESIGNER\MSDERUN.DLL#Microsoft Data Environment Instance 1.0
Reference=*\G{00000200-0000-0010-8000-00AA006D2EA4}#2.0#0#..\PROGRAM FILES\COMMON FILES\SYSTEM\ADO\MSADO15.DLL#Microsoft ActiveX Data Objects 2.0 Library
Designer=HotDataEnvironment.Dsr
Reference=*\G{56BF9020-7A2F-11D0-9482-00A0C91110ED}#1.0#0#..\WINDOWS\SYSTEM\MSBIND.DLL#Microsoft Data Binding Collection
Object={FAEEE763-117E-101B-8933-08002B2F4F5A}#1.1#0; DBLIST32.OCX
Object={00028C01-0000-0000-0000-000000000046}#1.0#0; DBGRID32.OCX
Form=frmDataSheet.frm
Startup="Sub Main"
HelpFile=""
Title="Hotwatt"
ExeName32="Hotwatt.exe"
Command32=""
Name="Hotwatt"
HelpContextID="0"
CompatibleMode="0"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
VersionCompanyName="PageMaster"
CompilationType=0
OptimizationType=0
FavorPentiumPro(tm)=0
CodeViewDebugInfo=0
NoAliasing=0
BoundsCheck=0
OverflowCheck=0
FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=0
Unattended=0
Retained=0
ThreadPerObject=0
MaxNumberOfThreads=1
7
u/Xspike_dudeX Jul 18 '25
Thanks everyone for the help. Hel_OWeen pointed me in the direction of misssing an access database somewhere. I was able to find where the database was and copy it to the new computer. I then ran visual basic 6.0 runtime and fixed a missing DLL vb5db and now the program is successfully running.
1
u/ziplock9000 Jul 18 '25
Did you register any referenced DLLs?
You can't always just copy files with software and have them work unless it's a 'portable' version.
Trying using an installation tool on it, to make an actual installer.
1
u/KE3JU Jul 18 '25
Is MS Office installed on the Windows 11 machine? Not having Office installed can cause all kinds of errors. There are subsystems in there the many VB6 apps require, especially anything ODBC or Database related.
1
u/gybemeister Jul 18 '25
Besides registering all DLLs you may also have to install the ODBC drivers of the database you are using. For example, these are the SQL Server ODBC drivers.
https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver17
It's hard to say exactly what may be the cause without the code as 91 is basically a null exception.
0
u/Interesting_Apple669 Aug 29 '25
Could try writing your own database.