This as a learning curve and also to improve routimes written years ago that now might be improved.
I hope I can use this thread to ask questions when I get stuck.
Much of the code I didn't write and haven't always understood.
Something in this category is the following
This returns the Windows folder name. But perhaps there's a simpler method? The "Private Declare" stuff I've never fathomed
and although it works, perhaps it'd be good to replace it with something more straightforward? Also the reference to Kernel32 on a 64 bit machine is/is not OK ?
Thanks for any help.
I hope I can use this thread to ask questions when I get stuck.
Much of the code I didn't write and haven't always understood.
Something in this category is the following
Code:
Declare Function GetWindowsDirectory2 Lib "Kernel32" Alias "GetWindowsDirectoryA" (ByVal p$, ByVal s%) As Long
Function sGetWinDir() As String
Dim sPath As String
sPath = String(255, Chr$(0))
sGetWinDir = Left(sPath, GetWindowsDirectory2(sPath, Len(sPath)))
End Function
and although it works, perhaps it'd be good to replace it with something more straightforward? Also the reference to Kernel32 on a 64 bit machine is/is not OK ?
Thanks for any help.