A
ambushsinger
I'm trying to select particular cells in an Excel worksheet from Access and
center or right justify them.
any ideas?
center or right justify them.
any ideas?
Paolo said:Hi ambushsinger,
for example to center (or right align) the content of cells J1 to K2
Set ExcelSheet = CreateObject("Excel.Sheet")
ExcelSheet.Application.Range("J1:K2").Select
With ExcelSheet.Application.Selection
.HorizontalAlignment = xlCenter ''to center horizontally
.HorizontalAlignment = xlRight ''to right align
.VerticalAlignment = xlCenter ''to center vertically
end with
HTH Paolo