I just checked two Win7 systems and the Personal (i.e. "Documents" or back to "My Documents" again in Win7, go figure) folder is not hidden. Perhaps the one you looked at had been infected at some point? That's a common reason for this issue.
The real question is why you'd put .MDB files in there at all???
That location is for the user's working documents, i.e. things they need to mess around with directly. Normally a program's database would go under either LocalAppdata or CommonAppdata, which are meant as program workspaces.
Your program should never try to find any of these locations by name. That's why Shell32.dll supports two APIs for looking up this info. One easy way to get this info is via the COM API:
- Set a reference to Microsoft Shell Controls And Automation
- Look up the paths by Special Folder value, using late binding to avoid a binary compatibility glitch in some versins of Windows
Dim strPath As String
strPath = .Path
Dim strDocs As String
Dim strLocalAD As String
strDocs = .NameSpace(ssfPERSONAL).Self.Path
strLocalAD = .NameSpace(ssfLOCALAPPDATA).Self.Path
The Shell Special Folder constants are documented in your VB6 copy of the MSDN Library (i.e. the online help). You could also go the bulkier route and use Shell32.dll's non-COM API (i.e. a few bulky Declares and wrapper code).
But you never want to dump files under LocalAppdata, ComonAppdata, etc. Instead you should be putting them into a unique subfolder, usually based on items such as App.CompanyName and App.Title.
If using CommonAppdata you also need to set security on your subfolder to permit your users to write there. This is why such a folder should be created during program installation, since the installer should already be running elevated anyway.
But I think I'm repeating myself.