ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Curdir (https://www.excelbanter.com/excel-programming/326341-curdir.html)

Jos Vens[_2_]

Curdir
 
Hi,

If I use curdir, it normally points to the folder MyDocuments (I don't know
how it is in english but in Dutch, it is Mijn Documenten), but sometimes, it
doesn't.

I'd like to store a preferences-file of the user in that folder, but how can
I be sure (or how can I let point) curdir always to MyDocuments, so that the
user always get his preferences in a network, no matter on which computer he
is on.

Thanks
Jos Vens



Bob Phillips[_6_]

Curdir
 
Hi Jos,

Get it with

Dim oWSH
Const SPECIAL_FOLDER_MY_DOCS As Long = 16
Set oWSH = CreateObject("WScript.Shell")

MsgBox oWSH.SpecialFolders(SPECIAL_FOLDER_MY_DOCS)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jos Vens" wrote in message
...
Hi,

If I use curdir, it normally points to the folder MyDocuments (I don't

know
how it is in english but in Dutch, it is Mijn Documenten), but sometimes,

it
doesn't.

I'd like to store a preferences-file of the user in that folder, but how

can
I be sure (or how can I let point) curdir always to MyDocuments, so that

the
user always get his preferences in a network, no matter on which computer

he
is on.

Thanks
Jos Vens





Jos Vens[_2_]

Curdir
 
thanks a lot Bob,

it works great!

Jos


"Bob Phillips" schreef in bericht
...
Hi Jos,

Get it with

Dim oWSH
Const SPECIAL_FOLDER_MY_DOCS As Long = 16
Set oWSH = CreateObject("WScript.Shell")

MsgBox oWSH.SpecialFolders(SPECIAL_FOLDER_MY_DOCS)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jos Vens" wrote in message
...
Hi,

If I use curdir, it normally points to the folder MyDocuments (I don't

know
how it is in english but in Dutch, it is Mijn Documenten), but sometimes,

it
doesn't.

I'd like to store a preferences-file of the user in that folder, but how

can
I be sure (or how can I let point) curdir always to MyDocuments, so that

the
user always get his preferences in a network, no matter on which computer

he
is on.

Thanks
Jos Vens








All times are GMT +1. The time now is 02:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com