在ACCESS中用VBA更改EXCEL单格元格的格式可用以下代码:
Private Sub test5()
'EXCEL单元格格式设置
Dim excelapplication As Object
Dim str As String
str = Application.CurrentProject.Path & '\book1.xls'
Set excelapplication = GetObject(str)
'获取指定的EXCEL文件
With excelapplication.sheets(1)
.Range(.Cells(1, 1), .Cells(3,
4)).Borders.LineStyle = xlContinuous
'设置单元格的边框
Private Sub test5()
Dim excelapplication As Object
Dim str As String
str = Application.CurrentProject.Path & '\book1.xls'
Set excelapplication = GetObject(str)
With excelapplication.sheets(1)
