Dim OpenFileName As Variant Dim wBook As Workbook Dim SampleReg As Workbook On Error Resume Next ' if it stuffs out go to the next step ActiveWorkbook = SampleReg OpenFileName = Application.GetOpenFilename() 'Opens the File Dialog If OpenFileName = False Then Exit Sub 'If no file selected stop Workbooks.Open (OpenFileName) 'works OpenFileName.Activate Databook = OpenFileName.Name Range("P6") = OpenFileName Workbooks(Databook).Activate
|Link Excel Spreadsheet to Access, not using Transferspreadsheet||5||28|
|Excel 2016 - Black cell borders||11||27|
|In this macro, I would like to be prompted for a folder.||7||23|
|Excel 2010 - Comparison of texts in a cell||14||34|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
22 Experts available now in Live!