VBA Excell..how do I force a toolbar to dock itself

I am modifying the "Standard " toolbar for Excel to add custom macro buttons.  If it is not visible, I want to make it visible,  which I can  do, and dock it at the top,  which I can't find a property for.  Is it posible to forcs it to dock?
quantzAsked:
Who is Participating?
 
ChrynobleConnect With a Mentor Commented:
quantz,

I am not point hungry, give them to pclemnt.

pclemnt,

I posed an answer to the question because you only left a comment.
0
 
pclementCommented:

Have you looked at the Position property of the CommandBar object?

0
 
ChrynobleCommented:
Try

CommandBar(index).Position = msoBarMenuBar
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
quantzAuthor Commented:
Commandbar(1) gave an error.
Toolbar(1) gives no error, but still puts the bar in the middle of the screen
0
 
quantzAuthor Commented:
Actually, after a bunch more fussing around, Chrynoble's answer had pointed me in the right direction.......so Chrynoble gets the points....repost & I will accept
0
 
pclementCommented:
quantz,

You didn't read my answer did you?

0
 
pclementCommented:
Well in that case we need to post:

CommandBars("Standard").Position =msoBarTop

....so that any link to this question has the correct answer.

0
 
pclementCommented:
Chrynoble,

I'm not going to sweat it either, quantz can distribute the points to whomever he believes helped him the most.

If he wanted a specific code example as opposed to checking out my doc reference, then that is fine with me.

I often post comments and provide pointers because I feel people learn better by doing to bit of research and work on their own. I don't generally don't like to give full complete code examples, but that seems to be the nature of the biz over here if you want the points. ;-)



 
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.