Set horizontal alignment of a spreadsheet cell

B

Brett

I am trying to set the horizontal alignment of cells for a spreadsheet on an
Active Server Page. It appears that this feature, if it was previously
supported, is not supported in OWC11. I took this code from the Office 2003
Web Components VB help file:
dim ssConstants
Set ssConstants = Spreadsheet1.Constants
Spreadsheet1.Range("K:T").HorizontalAlignment = ssConstants.xlHAlignLeft

This causes the error:
Object doesn't support this property or method:
'ssContants.xlHAlignLeft'


If anyone can help with this, I would apreciate it. Thanks!

Brett
 
M

Mike

This works,
sheet.Cells(rowOffset, colOffset).HAlignment = [1,2,3]
1=left
2=middle
3=right
 
B

Brett

You are correct. Thanks!
Is this documented (correctly) somewhere?

Brett


Mike said:
This works,
sheet.Cells(rowOffset, colOffset).HAlignment = [1,2,3]
1=left
2=middle
3=right


Brett said:
I am trying to set the horizontal alignment of cells for a spreadsheet
on
an
Active Server Page. It appears that this feature, if it was previously
supported, is not supported in OWC11. I took this code from the Office 2003
Web Components VB help file:
dim ssConstants
Set ssConstants = Spreadsheet1.Constants
Spreadsheet1.Range("K:T").HorizontalAlignment = ssConstants.xlHAlignLeft

This causes the error:
Object doesn't support this property or method:
'ssContants.xlHAlignLeft'


If anyone can help with this, I would apreciate it. Thanks!

Brett
 

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