Thanks Dave, but no go.
I have the logic you have in your reply but it refuses to work (to my
requirements, at least).
Given the situation where the user changes directories in the dialog then
cancels the transaction;
The next time the transaction (in the same session) is called it defaults
to the last directory used (the one changed to and cancelled)
FWIW, here's my logic
All variables DIM'd as string
I've verified that the "InDir" has the desired target directory
The logic performs as it should with the exception noted above.
CurFolder = CurDir
NewFolder = Left(InDir, Len(InDir) - 1) 'Tried stripping the "\"
from the directory name- no change
ChDrive NewFolder
ChDir NewFolder
With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = False
.Show
If .SelectedItems.Count = 0 Then GoTo ExitGetRec 'User bailed out
InRec = .SelectedItems(1)
DLM = InStr(UCase$(InRec), "\ACC309-R")
RecBk = Right(InRec, Len(InRec) - DLM)
Workbooks.Open InRec
Sheets("Rec").Copy After:=ThisWorkbook.Sheets("Sys")
Workbooks(RecBk).Close SaveChanges:=False
End With
ExitGetRec:
ChDrive CurFolder
ChDir CurFolder
End Sub
I realize that the user can "steer" to the proper directory but I'd prefer
that they didn't have to(!).
This is my first attempt using the dialog, prior to this (xl2k) I built a
menu with the required files but thought this would be easier!
Again, thanks.