Access 2007
Hi all,
I am exporting a table to excel then formatting from access in excel like so;
The problem is that I can't set the borders - .Application.Selection.borders does not seem to be reconised.
All other formatting, bolding, italics etc, works, but for some reason I cannot get the border to work.
Any help in the correct direction will be appreciated.
I am not sure if this belongs in the excel forum or excel, apologies if incorrect and I will move it.
Many tahnks.
Michael
Hi all,
I am exporting a table to excel then formatting from access in excel like so;
Code:
Dim xlApp As Object
Dim xlSheet As Object
Set xlApp = CreateObject("Excel.Application")
Set xlSheet = xlApp.Workbooks.Open(sFile).Sheets(1)
With xlApp
.Application.Rows("1:1").Select
.Application.Selection.Font.Bold = True
.Application.Selection.borders
.Application.Selection.Weight = xlThin
The problem is that I can't set the borders - .Application.Selection.borders does not seem to be reconised.
All other formatting, bolding, italics etc, works, but for some reason I cannot get the border to work.
Any help in the correct direction will be appreciated.
I am not sure if this belongs in the excel forum or excel, apologies if incorrect and I will move it.
Many tahnks.
Michael