#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default 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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CurDir("c") BobAchgill Excel Programming 1 February 18th 05 03:28 PM
CurDir does not work Jim73 Excel Programming 3 January 12th 05 08:15 AM
CurDir vi_sh_wa Excel Programming 2 December 14th 04 08:17 AM
Excel 97 VBA - CURDIR, not reliable Ricke G Excel Programming 2 July 28th 04 07:52 PM


All times are GMT +1. The time now is 06:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"