_Слив ОСВ_v3.86 Шаблон 51 Универсальный
Sub CopySh() Application.ShowWindowsInTaskbar = False Dim wbCopy As Workbook With Application.FileDialog(1) .Show If .SelectedItems.count <> 1 Then Exit Sub Set wbCopy = GetObject(.SelectedItems(1)) End With With wbCopy ' .ActiveSheet.Copy before:=Workbooks(ThisWorkbook.Name).Sheets(1)\ ' .ActiveSheet.Copy before:=Workbooks(ThisWorkbook.Name).Sheets("Банки") ' Range("J1:J10").Value = .ActiveSheet.Range("G1:G10").Value ThisWorkbook.Sheets("Лист3").Range("J1:J10").Value = .Sheets("Банки").Range("G1:G10").Value Windows(.Name).Visible = True .Close (False) End With Application.ShowWindowsInTaskbar = True End Sub |
http://www.excelworld.ru/stuff/vba_function/object/getobject/28-1-0-132