Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Declaring Variable as VBConstant

I've using the following to call a proc. to create a custom toolbar. But
I'm uncertain as to what to dim the variable vbPosition as, as I'm assigning
it the vb constant msoBarTop.

Sub Test()
Dim arrToolCaption As Variant, arrToolMacro As Variant, strDelimiter As
String, vbPosition As Variant
arrToolCaption = Array("Tool1", "Tool2", "Tool3", "Tool4")
arrToolMacro = Array("Macro1", "Macro2", "Macro3", "Macro4")
strDelimiter = " |"
vbPosition = msoBarTop
CreateToolbar arrToolCaption, arrToolMacro, strDelimiter, vbPosition
End Sub

Thanks,
Wayne C.




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Declaring Variable as VBConstant

Wayne -

According to VBA Help:

Add Method

Creates a new command bar and adds it to the collection of command bars.
Returns a CommandBar object.

expression.Add(Name, Position, MenuBar, Temporary)

expression Required. An expression that returns a CommandBars object.

Name Optional Variant. The name of the new command bar. If this
argument is omitted, a default name is assigned to the command bar (such
as Custom 1).

Position Optional Variant. The position or type of the new command bar.
Can be one of the MsoBarPosition constants listed in the following table.

Constant Description

msoBarLeft, msoBarTop, msoBarRight, msoBarBottom Indicates the left,
top, right, and bottom coordinates of the new command bar

msoBarFloating Indicates that the new command bar won't be docked

msoBarPopup Indicates that the new command bar will be a shortcut menu

msoBarMenuBar Macintosh only

MenuBar Optional Variant. True to replace the active menu bar with the
new command bar. The default value is False.

Temporary Optional Variant. True to make the new command bar temporary.
Temporary command bars are deleted when the container application is
closed. The default value is False.


- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______



The Vision Thing wrote:

I've using the following to call a proc. to create a custom toolbar. But
I'm uncertain as to what to dim the variable vbPosition as, as I'm assigning
it the vb constant msoBarTop.

Sub Test()
Dim arrToolCaption As Variant, arrToolMacro As Variant, strDelimiter As
String, vbPosition As Variant
arrToolCaption = Array("Tool1", "Tool2", "Tool3", "Tool4")
arrToolMacro = Array("Macro1", "Macro2", "Macro3", "Macro4")
strDelimiter = " |"
vbPosition = msoBarTop
CreateToolbar arrToolCaption, arrToolMacro, strDelimiter, vbPosition
End Sub

Thanks,
Wayne C.





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Declaring Variable as VBConstant

Thanks Jon.

"Jon Peltier" wrote in message
...
Wayne -

According to VBA Help:

Add Method

Creates a new command bar and adds it to the collection of command bars.
Returns a CommandBar object.

expression.Add(Name, Position, MenuBar, Temporary)

expression Required. An expression that returns a CommandBars object.

Name Optional Variant. The name of the new command bar. If this
argument is omitted, a default name is assigned to the command bar (such
as Custom 1).

Position Optional Variant. The position or type of the new command bar.
Can be one of the MsoBarPosition constants listed in the following table.

Constant Description

msoBarLeft, msoBarTop, msoBarRight, msoBarBottom Indicates the left,
top, right, and bottom coordinates of the new command bar

msoBarFloating Indicates that the new command bar won't be docked

msoBarPopup Indicates that the new command bar will be a shortcut menu

msoBarMenuBar Macintosh only

MenuBar Optional Variant. True to replace the active menu bar with the
new command bar. The default value is False.

Temporary Optional Variant. True to make the new command bar temporary.
Temporary command bars are deleted when the container application is
closed. The default value is False.


- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______



The Vision Thing wrote:

I've using the following to call a proc. to create a custom toolbar.

But
I'm uncertain as to what to dim the variable vbPosition as, as I'm

assigning
it the vb constant msoBarTop.

Sub Test()
Dim arrToolCaption As Variant, arrToolMacro As Variant, strDelimiter

As
String, vbPosition As Variant
arrToolCaption = Array("Tool1", "Tool2", "Tool3", "Tool4")
arrToolMacro = Array("Macro1", "Macro2", "Macro3", "Macro4")
strDelimiter = " |"
vbPosition = msoBarTop
CreateToolbar arrToolCaption, arrToolMacro, strDelimiter, vbPosition
End Sub

Thanks,
Wayne C.







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
Declaring a DLL Erich Neuwirth Excel Programming 1 May 10th 04 06:27 PM
Declaring a variable? pgoodale[_4_] Excel Programming 2 January 2nd 04 03:26 PM
DEclaring variables Pedro Excel Programming 1 November 13th 03 05:02 PM
Declaring variables Pedro Excel Programming 1 November 13th 03 03:32 PM
DEclaring variables Pedro Excel Programming 2 November 13th 03 11:54 AM


All times are GMT +1. The time now is 11:04 AM.

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

About Us

"It's about Microsoft Excel"