Change Dir

L

Luke Bellamy

Hi - I was trying to work out how I can set CurDir to return what I want.
I tried "ChDir" command in the VBA code but it didn't make CurDir return
anything different.

Thankyou
 
L

Luke Bellamy

Ahhh... jumped the gun.
You should always search MVPs.org/access before
asking silling questions

' Add this at the top of the module.
Private Declare Function SetCurrentDirectory _
Lib "kernel32" Alias "SetCurrentDirectoryA" _
(ByVal lpPathName As String) As Long
 
D

Dirk Goldgar

Luke Bellamy said:
Hi - I was trying to work out how I can set CurDir to return what I
want. I tried "ChDir" command in the VBA code but it didn't make
CurDir return anything different.

That's odd -- it seems to work for me. What exactly did you try?
 
Top