'Cell2 = oExcel.workbooks(1).activesheet. ![]() 'Set Cell = oExcel.workbooks(1).activesheet.cells(1, 1) Set oExcel = CreateObject("Excel.Application") How can I find/close that locked workbook? I've tried rerunning the sub without first opening another workbook, but that didn't help. How can I find/close that locked workbook Option Compare Database Option Explicit Dim oExcel As Object Private Sub Command0Click() Dim stDocumentPath As String Dim Cell As Object Dim stData As String 'create Excel object Set oExcel CreateObject('Excel.Application') 'get path to Document stDocumentPath CurrentProject. ![]() Now Excel won't let me open the file, saying it's "locked for editing."Ī forum thread suggests deleting the temp file that shows this state, but when I try to do that I get the Catch 22 result: Can't delete the file because the sheet is open in Excel." And while downloading the file browser prompted for save or open. Has anyone faced this error The excel file is downloaded from Internet. Due to this the macros inside this excel is not executing. Below is the screen shot which is appearing to users. It happens that the sub crashes before it closes the open worksheet. It shows a file in use message and says the file is in use by Win764bit. I'm experimenting with opening Excel files from Access VBA.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |