สั่งให้ทุแถวให้เป็น tahoma ขนาด 11 ทั้งหมดเลยต้องทำอย่างไรคะ
Private Sub Command0_Click()
Dim xlApp As Object
Dim xlWorkbook As Object
Dim xlSheet As Object
DoCmd.TransferSpreadsheet acExport, , "Query1", "D:\ExportQuery1.xls", True
Set xlApp = CreateObject("excel.application")
Set xlWorkbook = xlApp.Workbooks.Open("D:\ExportQuery1.xls")
Set xlSheet = xlWorkbook.activesheet
With xlSheet.range("A1")
.entirerow.insert -4121 ' Insert and Shift Row Down
.entirerow.insert -4121 ' Insert and Shift Row Down
xlApp.DisplayAlerts = False
xlSheet.range("A1:F2").merge ' Merge Cells (ผสานเซล A1:F2)
xlApp.DisplayAlerts = True
End With
With xlSheet.range("A1")
.Value = "ชื่อหัวเรื่องที่ต้องการ"
.Font.Name = "Tahoma"
.Font.Size = 18
.Font.Bold = True
.HorizontalAlignment = -4108 ' Align Center
End With
With xlSheet
.Font.Name = "Tahoma" .Font.Size = 11 'กำหนดขนาด
.Font.Bold = false 'กำหนดตัวหนาหรือปกติ
.Columns("A").ColumnWidth = ......
.Columns("B").ColumnWidth = ......
.Columns("C").ColumnWidth = ......
.Columns("D").ColumnWidth = ......
.Columns("E").ColumnWidth = ......
.Columns("F").ColumnWidth = ......
End With
xlApp.ActiveWorkbook.Close True
End Sub