Where can I find a full list of "mso" constants?

N

Nick Hebb

I've decided to change my COM add-in to use late binding, so I'm going
to change all my Excel types to Object and all my "mso" constants to
their values. But going through and Debug.Print'ing all of them would
be a real pain. Does anyone know where I can find a list of all the mso
constants and their values?

Thanks,

Nick Hebb
BreezeTree Software, LLC
http://www.breezetree.com
 
N

Nick Hebb

Thanks Chip and Tom. That's a great list. Unfortunately, it doesn't
list the msoShapes* constants, so I'll need to put together my own
list.

If you want to append it to your list, I can email it to you after I
compose.

Thanks,

Nick Hebb
BreezeTree Software, LLC
http://www.breezetree.com
 
C

Chip Pearson

It does list the mso Shape constants, beginning on line 2342
(when the file is generated in Office 2003) on the Groups page.
They're listed as part of the MsoAutoShapeType enum.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
P

Peter T

Hi Nick,

I use a very un-sophisticated way to get constants, without going into
tlb's. But it's only a one off exercise and quick & simple.

Copy the list of constant names from help into cells, arrange and sort into
one column, say in col B, with no empty cells

C1 ="Cells("& ROW() &",1) = " & B1

autofill down

Paste what's in col C into an empty Sub & run

For the msoShapes, type "AutoShapeType" in a module, select & F1

Regards,
Peter T
 
C

Chip Pearson

There was a bug that caused their omission from the Alpha page.
Re-download the file from the web site and re-run the
"ListExcelConstants" macro.
 
N

Nick Hebb

Thanks again Chip.

I get a "programmatic access not trusted" error on this line:

Set TLInfo_XL =
TLApp.TypeLibInfoFromFile(ThisWorkbook.VBProject.References("EXCEL").FullPath)

I'm don't know a great deal about security settings, so someone sharper
could probably find a way around it.

It didn't matter, though since the new version was fully populated.

Nick Hebb
BreezeTree Software, LLC
http://www.breezetree.com
 
C

Chip Pearson

You need to go to the Tools menu, choose Macros, then Security.
In that dialog, choose the Trusted Sources tab, and check the
"Trust access to Visual Basic project" setting.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
N

Nick Hebb

That worked.

I assume Excel is pretty "constant" about its constants, i.e., it may
add new ones with each version but doesn't change old ones?
 
C

Chip Pearson

MS wouldn't change the value of any existing constant, but will
certainly add new ones as the need arises.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

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