excel vba‎ > ‎

Relative instead of Absolute paths in Excel VBA

posted Jan 16, 2014, 2:16 AM by Roberto Felicini   [ updated Jan 16, 2014, 2:16 AM ]
    Application.ScreenUpdating = False
        ' import file  -----------------------------------------------------------------
           ChDir ThisWorkbook.Path
            fname = Application.GetOpenFilename
            If fname = False Then
                MsgBox "User pressed cancel"
                    Sheets("home").Select
                Exit Sub
            Else
                    Workbooks.Open Filename:=fname
               
                WA = ActiveWindow.Caption
'                Application.ScreenUpdating = False
       
                '------------------/ delete row to the sales report
                Windows(Worigin).Activate
                Sheets("salesreport").Select
                wrk = ActiveWorkbook.Name
Comments