Access to Excel, Borders + Alignments =(

K

Kaseano

Hey,
I'm formatting excel via Access.
Most of the code (from klatuu) works.

Some stuff returns error messages though.

For instance,
xlSheet.Range("C3:E10").Borders.LineStyle = xlContinuous
works

while,
xlSheet.Range("C3:E10").Borders.Weight = Thin
returns
"Error #1004: Unable to set the Weight property of the Borders class"
.Columns(1).HorizontalAlignment = xlCenter
returns
"Error #1004: Unable to set the Horizontal Alignment property of the Range
class"


Any Help/Advice would be really Really Appreciated.
Thanks~
 
R

Ralph

xlSheet.Range("C3:E10").Borders.Weight = xlThin
xlSheet.Columns(1).HorizontalAlignment = xlCenter
 
K

Kaseano

Error #1004: Unable to set the Weight property of the Borders class

Error #1004: Unable to set the HorizontalAlignment property of the Range class
 
K

Kaseano

Woo figured it out,
didn't have excel referenced in the Access VB.

Sorry for the post.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top