http://www.mvps.org/access/api/api0008.htm
Has a function that should do what you want. Matt Harris [EMAIL PROTECTED] www.launchpadzero.net ICQ: 1656005 > -----Original Message----- > From: [email protected] > [mailto:[EMAIL PROTECTED] Behalf Of Heaton, Timothy H. > (USD) > Sent: Saturday, September 22, 2007 8:22 PM > To: [email protected] > Subject: [Access VBA Central] Finding a Windows username in VBA > > > I wrote a home-made Common Dialog Box for VBA, but I'm wondering if > there's a way to grab the current Windows username in VBA. I want it for > a shortcut to My Documents, as in: > > ChDir "C:\Documents and Settings\" & UserName & "\My Documents" > > Any ideas? > > -Tim
