Public Function Set_Sheet_Viborka(Patch_Name As String, Sheet_Name As String)
Dim xl As Object
Dim xlBook As Object
Dim xlSheet As Object
Dim row, col
Set xl = CreateObject("Excel.Application")
Set xlBook = xl.Workbooks.Add()
Set xlSheet = xl.Worksheets(1)
xl.Application.Visible = True
xl.Parent.Windows(1).Visible = True
xl.Application.Cells(1, 1).Value = "ведомость за " & MonthName(Month(Date)) & ", " & Year(Date)
xl.ActiveSheet.Range("A1:D1").Merge
row = row + 2
xl.Application.Cells(row, 1).Value = "Руководитель:____________________"
row = row + 2
xl.Application.Cells(row, 2).Value = "М.П."
row = row + 2
xl.Application.Cells(row, 1).Value = "Главный бухгалтер:____________________"
xl.ActiveSheet.Range("A12:D12").FormulaR1C1 = "Всего: " & "6757"
xl.Save
xl.Quit
Set xlSheet = Nothing
Set xlBook = Nothing
Set xl = Nothing
|