Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Enumerated constants defined where?

Where are the MsoBarPosition constants stored?

Doesn't matter what I use (msoBarLeft, msoBarTop, msoBarRight, msoBarBottom,
msoBarFloating, msoBarPopup, or msoBarMenuBar), it's appearing at left. If I use
a number instead of the constant, it works. Obviously it's defaulting to
msoBarLeft (0).

For fun, type "MsoBarPosition" into Google and see what they suggest for "Did
you mean"...

TIA.

jon
--

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Enumerated constants defined where?

The constants are stored in the Office DLL file, typically
C:\Program Files\Common Files\Microsoft Shared\office11\mso.dll


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


"JW" wrote in message
...
Where are the MsoBarPosition constants stored?

Doesn't matter what I use (msoBarLeft, msoBarTop, msoBarRight,

msoBarBottom,
msoBarFloating, msoBarPopup, or msoBarMenuBar), it's appearing

at left. If I use
a number instead of the constant, it works. Obviously it's

defaulting to
msoBarLeft (0).

For fun, type "MsoBarPosition" into Google and see what they

suggest for "Did
you mean"...

TIA.

jon
--



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Enumerated constants defined where?

JW:

Let me add some background to Chip's reply..


You probably do not use

Option Explicit

if variables do not need to be declared then using s'th like
AnyOddConstant will just return an Empty Variant

(unless ofcourse you or a referenced library has defined the constant)

so:
in your project you must set a reference to:
Microsoft Office 10.0 Object Library (version may be different)

and:
it's VERY good practive to ALWAYS use Option Explicit
to force this:
in the VBE =
= Tools Options
= Require Variable Declaration CHECK



HTH


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


JW wrote :

Where are the MsoBarPosition constants stored?

Doesn't matter what I use (msoBarLeft, msoBarTop, msoBarRight,
msoBarBottom, msoBarFloating, msoBarPopup, or msoBarMenuBar), it's
appearing at left. If I use a number instead of the constant, it
works. Obviously it's defaulting to msoBarLeft (0).

For fun, type "MsoBarPosition" into Google and see what they suggest
for "Did you mean"...

TIA.

jon


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Enumerated constants defined where?

"keepITcool" wrote:

JW:

Let me add some background to Chip's reply..


You probably do not use

Option Explicit

if variables do not need to be declared then using s'th like
AnyOddConstant will just return an Empty Variant

(unless ofcourse you or a referenced library has defined the constant)

so:
in your project you must set a reference to:
Microsoft Office 10.0 Object Library (version may be different)

and:
it's VERY good practive to ALWAYS use Option Explicit
to force this:
in the VBE =
= Tools Options
= Require Variable Declaration CHECK


Thanks for your suggestions, which indeed worked. When using VB, I always set
Option Explicit. Guess I'm lazier when it comes to VBA & Vbscript. Learned my
lesson.

jon
--

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Enumerated constants defined where?

JW,

You can have VBA automatically add 'Option Explicit' to all new
code modules. In VBA, go to the Tools menu, choose Options,
Editor tab, and check "Require Variable Declaration".


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



"JW" wrote in message
...
"keepITcool" wrote:

JW:

Let me add some background to Chip's reply..


You probably do not use

Option Explicit

if variables do not need to be declared then using s'th like
AnyOddConstant will just return an Empty Variant

(unless ofcourse you or a referenced library has defined the

constant)

so:
in your project you must set a reference to:
Microsoft Office 10.0 Object Library (version may be

different)

and:
it's VERY good practive to ALWAYS use Option Explicit
to force this:
in the VBE =
= Tools Options
= Require Variable Declaration CHECK


Thanks for your suggestions, which indeed worked. When using

VB, I always set
Option Explicit. Guess I'm lazier when it comes to VBA &

Vbscript. Learned my
lesson.

jon
--





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Enumerated constants defined where?


good advice Chip..

I told him so already <g yo!

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Chip Pearson wrote :

You can have VBA automatically add 'Option Explicit' to all new
code modules. In VBA, go to the Tools menu, choose Options,
Editor tab, and check "Require Variable Declaration".


"JW" wrote in message
...
"keepITcool" wrote:


and:
it's VERY good practive to ALWAYS use Option Explicit
to force this:
in the VBE =
= Tools Options
= Require Variable Declaration CHECK


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Enumerated constants defined where?

I didn't notice you'd already said it.


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


"keepITcool" wrote in message
...

good advice Chip..

I told him so already <g yo!

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Chip Pearson wrote :

You can have VBA automatically add 'Option Explicit' to all

new
code modules. In VBA, go to the Tools menu, choose Options,
Editor tab, and check "Require Variable Declaration".


"JW" wrote in message
...
"keepITcool" wrote:


and:
it's VERY good practive to ALWAYS use Option Explicit
to force this:
in the VBE =
= Tools Options
= Require Variable Declaration CHECK




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wierd names defined as arrays of constants?!? Andy Smith[_2_] Excel Discussion (Misc queries) 1 September 18th 09 10:02 PM
Wierd names defined as arrays of constants?!? Andy Smith[_2_] Excel Discussion (Misc queries) 0 September 18th 09 08:01 PM
Run-time error '50290': Application-defined or object-defined erro Macro button Excel Discussion (Misc queries) 1 March 12th 09 10:59 AM
"User-defined type not defined" message in Excel RW1946 Excel Discussion (Misc queries) 0 August 31st 05 12:14 PM
Word.Document - user defined type not defined jowatkins[_7_] Excel Programming 0 January 20th 04 08:46 AM


All times are GMT +1. The time now is 09:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"