Hi,

I've tried to load the whole of my original VB 3 program in VB 6. However, whenever I tried to run it, an error will occur "Run Time Error 53: File not found: kernel". (I did not change the program's original directory.)

The following is the code is I've used:
*******************************************************
Declare Function GetPrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer, ByVal lpFileName As String) As Integer

Declare Function WritePrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, lpKeyName As Any, lpString As Any, ByVal lplFileName As String) As Integer

fname = "treasury.ini"
sectionName = "Treasury"
entryname = "TreasuryDB"
defaultDB = "c:\treasury\treasury.mdb"
keyvalue = String$(57, 0)

rc = GetPrivateProfileString(sectionName, entryname, defaultDB, keyvalue, Len(keyvalue), fname)

*******************************************************

Can anyone help me to resolve this problem?

Thank you very much.


Regards.