![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 110
|
I WANT THE CHECK TO SEE THAT MY PATH(THE PATH OF THE CURRENT FILE I'M IN) AND THE CURRENT DIRECTORY ARE THE SAME. IF NOT, I
WANT TO CHANGE THE CURRENT DIRECTORY TO MY PATH. THE CODE BELOW DOESN'T CHANGE "MY DOCUMENTS" TO THE FOLDER OF THE FILE I'M IN. THANKS, Mike Dim strThispath As String Dim strThisCurDir As String strThispath = Application.ThisWorkbook.Path strThisCurDir = CurDir If strThisCurDir <> strThispath Then ChDir strThispath End If |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Check what Drive you are in...if diff then
you'll have to change drive 1st. eg ChDrive "D:" Ivan |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|