RogueAce
asked on
Gaak...generic name for Windows directory
What is the code used to grab the name of the Windows directory and use it in my program?
Rogue
Rogue
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, you guys!
Add a Reference in your project (VB Menu.. Project.. References) to "Microsoft Scripting Runtime" ie. SCRRUN.DLL and then you can use the following.. <smile>.
<----- code begin ----->
Dim fso As New FileSystemObject
Dim strFolderName As String
strFolderName = fso.GetSpecialFolder(Windo
MsgBox strFolderName
<----- Code End ----->
Short, sweet and 100% VB.