Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Re: Excel
Miscellaneous
Thread ID:
00437163
Message ID:
00437173
Views:
21
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>I'm trying to automate Excel from Foxpro.
>>The problem I'm having is..I'd like to to align center a range of cells.

>>I'm using..
>>oSheet.Range("A1:A1").HorizontalAlignment = xlCenter

>>But I dont know the numeric equivalent of xlCenter....
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

If you have VB loaded (or even one of the VBA-based products like Word or Excel itself) you can use the object browser to find information on constants.

For instance, in Excel, Alt+F11 brings you to the VBA editor, and F2 brings up the object browser. Search for the constant(s) you need and the info panel on the bottom gives the value.

The Object Browser is really an invaluable tool when undertaking work with automation, or using not-very-well documented components written in another language.
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform