![]() Public Function cmdFileDialog() As String ![]() Private Const strPathPDF As String = "C\placeYourPathHere\" ' to be customized. I think no need to use automation to achieve your task, try replace your code by this solution. Set objXL = GetObject(, selectedFile, "Excel.Application") I tried adding the following code but it errors out: If Right(selectedFile, 5) ".xlsx" Then MsgBox "Invalid file type! Expecting. If Dir(selectedFile) = "" Then MsgBox "The thle path provided does not exist.": Exit Sub If selectedFile = "" Or IsNull(selctedFile) Then Exit Sub I need the first part because the file name will change from month to month but once I've selected the file I need to be able to open the file,ĭelete some rows from the beginning, check the headers, save as. ![]() I have written code to select an Excel file when prompted but I now need to continue the code to open that file. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |