Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
perfect!! - thxs
Norman Jones wrote: Hi Al007, Try: '============= Sub Opendefactivewkbk() Dim wb As Workbook Dim FName Dim myDir As String myDir = CurDir On Error Resume Next Set wb = ActiveWorkbook On Error GoTo 0 If Not wb Is Nothing Then If ActiveWorkbook.Path < vbNullString Then ChDrive ActiveWorkbook.Path ChDir ActiveWorkbook.Path End If Else ChDrive "D" '<<==== CHANGE ChDir "D:\Test" '<<==== CHANGE End If FName = Application.GetOpenFilename() If FName < False Then Workbooks.Open FName ChDrive myDir ChDir myDir End Sub '<<============= --- Regards, Norman "al007" wrote in message oups.com... Norman, sorry to trouble u, but have tested the code & it does not work - it's not opening folder of my current active workbook (but my last opened folder) & it does not work if I apply it when I have no active workbook open - can u help pls thxs |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How I can I open a small window within window | Excel Discussion (Misc queries) | |||
OPen an DOS WIndow | Excel Discussion (Misc queries) | |||
open new window | Excel Discussion (Misc queries) | |||
Excel workbook does not open in open window on desktop | Excel Discussion (Misc queries) | |||
Error on activating a window a open workbook | Excel Programming |