Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Floating Toolbar Questions

I have added a toolbar to a workbook with following code:

Set cbar = Application.CommandBars.Add(Name:="Custom Toolbar", _
Position:=msoBarFloating, Temporary:=True)
cbar.Visible = True

1. Why is that, even though I have Temporary:=True, the toolbar will not go
away when I close the file? I have to put a macro in the
Workbook_BeforeClose event to delete the toolbar.

2. When the workbook is opened, the toolbar appears somewhere in the middle
of the workbook, whereas I would like to it to be somewhere in the top right
corner. Is there any way I can control the initial position of a floating
toolbar? If so, how?

TIA.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Floating Toolbar Questions

1. Temporary means that it wont remain after Excel is closed, not the
workbook. You should use Workbook_BeforeClose to kill your toolbar.

2. Set the Position argument to msoBarTop

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Shatin" wrote in message
...
I have added a toolbar to a workbook with following code:

Set cbar = Application.CommandBars.Add(Name:="Custom Toolbar", _
Position:=msoBarFloating, Temporary:=True)
cbar.Visible = True

1. Why is that, even though I have Temporary:=True, the toolbar will not

go
away when I close the file? I have to put a macro in the
Workbook_BeforeClose event to delete the toolbar.

2. When the workbook is opened, the toolbar appears somewhere in the

middle
of the workbook, whereas I would like to it to be somewhere in the top

right
corner. Is there any way I can control the initial position of a floating
toolbar? If so, how?

TIA.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Floating Toolbar Questions

Thanks for your help again, Rob!

"Rob van Gelder" wrote in message
...
1. Temporary means that it wont remain after Excel is closed, not the
workbook. You should use Workbook_BeforeClose to kill your toolbar.

2. Set the Position argument to msoBarTop

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Shatin" wrote in message
...
I have added a toolbar to a workbook with following code:

Set cbar = Application.CommandBars.Add(Name:="Custom Toolbar", _
Position:=msoBarFloating, Temporary:=True)
cbar.Visible = True

1. Why is that, even though I have Temporary:=True, the toolbar will not

go
away when I close the file? I have to put a macro in the
Workbook_BeforeClose event to delete the toolbar.

2. When the workbook is opened, the toolbar appears somewhere in the

middle
of the workbook, whereas I would like to it to be somewhere in the top

right
corner. Is there any way I can control the initial position of a

floating
toolbar? If so, how?

TIA.







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
Floating toolbar disappear when embedded ARHangel Excel Discussion (Misc queries) 0 June 19th 09 03:29 PM
floating toolbar to stay put BorisS Excel Discussion (Misc queries) 2 December 3rd 06 08:47 PM
get rid euro conversion floating toolbar zero Excel Worksheet Functions 1 August 4th 05 06:21 AM
Floating Toolbar Dave Excel Discussion (Misc queries) 4 April 29th 05 04:57 PM
PDF 4.0 Floating Toolbar Darrell Excel Discussion (Misc queries) 1 February 10th 05 06:14 PM


All times are GMT +1. The time now is 10:03 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"