Проблема с завершением процесса Excel |
Public Sub Open_Click() Dim dlgOpenFile As Object Dim OTT As Variant Dim sFile As String Dim oXL As Excel.Application, oWB As Excel.Workbook, oWS As Excel.Worksheet Set oXL = CreateObject("Excel.Application") Set dlgOpenFile = Application.FileDialog(3) With dlgOpenFile .Filters.Add "Файлы Excel", "*.xls, *.xlsx, *.xlsb, *.xlsm", 1 .InitialFileName = CurrentProject.Path .AllowMultiSelect = False .Title = "Выберите файл" If (.Show = -1) And (.SelectedItems.Count > 0) Then sFile = .SelectedItems(1) End If End With Set dlgOpenFile = Nothing If sFile = "" Then Exit Sub End If Set oWB = oXL.Workbooks.Open(sFile) Set oWS = oWB.Sheets(1) OTT = oWS.Range(oWS.Cells(1, 1), oWS.Cells(500, 30)) Set oWS = Nothing oWB.Close Set oWB = Nothing oXL.Quit Set oXL = Nothing
http://www.sql.ru/forum/1204718/problema-s-zaversheniem-processa-excel
Комментировать | « Пред. запись — К дневнику — След. запись » | Страницы: [1] [Новые] |