I am trying to do three things with automation from access. I have been able to change column width, font size etc, but I haven't been able to figure out how to add a border to a group of cells, change the backgroud color, and change the alighnment to center. Everything works on getting the excel doc open and formatted with the simple stuff. He is a small sample of my code.
Dim xlapp As Object, xlwb As Object, xlws As Object
Set xlapp = CreateObject("Excel.Application")
Set xlwb = xlapp.Workbooks.Add
Set xlws = xlwb.worksheets("Sheet1")
With xlws
.range("C35:G35").numberformat = "0.0%"
end with
How do I change the alignment of range("A1:a3") to center? How can I change the backcolor for range("b2:b7") to white? Thanks!
Brennan
Dim xlapp As Object, xlwb As Object, xlws As Object
Set xlapp = CreateObject("Excel.Application")
Set xlwb = xlapp.Workbooks.Add
Set xlws = xlwb.worksheets("Sheet1")
With xlws
.range("C35:G35").numberformat = "0.0%"
end with
How do I change the alignment of range("A1:a3") to center? How can I change the backcolor for range("b2:b7") to white? Thanks!
Brennan