From: "Jeff Davies" References: <7v4vb8$gl2$1@nnrp1.deja.com> Subject: Re: %userprofile% - saving a file to current users Profiles directory? Date: Wed, 27 Oct 1999 11:29:56 +1000 Lines: 42 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Message-ID: Newsgroups: microsoft.public.access.externaldata,microsoft.public.access.modulesdaovba,microsoft.public.excel.misc,microsoft.public.excel.programming NNTP-Posting-Host: mail.jduconsulting.com.au 139.130.59.18 Path: cppssbbsa01.microsoft.com!cppssbbsa05 Xref: cppssbbsa01.microsoft.com microsoft.public.access.externaldata:12815 microsoft.public.access.modulesdaovba:46585 microsoft.public.excel.misc:62023 microsoft.public.excel.programming:92823 Guys, I just had a play with the code out of Environ help and came up with the following that shows all the settings. Sub showEVs() dim EnvString, Indx, Msg Indx = 1 ' Initialize index to 1. do EnvString = Environ(Indx) ' Get environment variable. Msg = "Entry No " & Indx & ": " & Environ(Indx) Indx = Indx + 1 msgbox Msg, , "Environment Variable" ' Display message. loop Until EnvString = "" end Sub Jeff Davies Patrick McCarthy wrote in message news:Oj7lSiAI$GA.251@cppssbbsa05... > Jim, thanks, I never tried it with 98! > > Patrick > > > Jim Rech wrote in message > news:e#uwS1$H$GA.213@cppssbbsa02.microsoft.com... > > I think this will do it: > > > > UserDir = environ("userprofile") > > > > BTW, Patrick, this works for me under Win 98. > > > > -- > > Jim Rech > > Excel MVP > > > > > > > >