Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default CommandBar ActiveX

Hi Everyone.

I read the other day about the Object Browser and how you can Show Hidden
Members.
So, I thought I'd go exploring - for fun - and discovered CommandBarActiveX
object.

I got it sort of working so you can have a WebBrowser Commandbar Button -
which is promising.
For my own personal productivity Personal.xls, I'd like to build it more.
It gets funky with the Width and Height - making it's own mind up -
especially when docking.

Has anyone has experience in this area and can assist?


Private MyWeb As WebBrowser

Sub test()
Const cBarName = "My Web Browser"
Dim bar As CommandBar, cbt As [_CommandBarActiveX]

On Error Resume Next: Application.CommandBars(cBarName).Delete: On Error
GoTo 0

With Application.CommandBars.Add(cBarName, , , True)
Set cbt = .Controls.Add(msoControlActiveX)
cbt.ControlCLSID = "{8856F961-340A-11D0-A96B-00C04FD705A2}"
'Microsoft Internet Controls
.Visible = True
DoEvents
Set MyWeb =
cbt.QueryControlInterface("{00020400-0000-0000-C000-000000000046}")
'IDispatch
MyWeb.Navigate2 "http://www.google.com/"
End With
End Sub


(Please, no reminders about the nature of undocumented features...)

Cheers

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



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
commandbar problems Richard Cook Excel Discussion (Misc queries) 1 July 8th 05 05:32 PM
CommandBar Controls Simon Shaw[_5_] Excel Programming 3 December 28th 04 05:05 PM
Add-In needs to create CommandBar lucp Excel Programming 8 June 27th 04 01:46 PM
commandbar Greg Prost[_2_] Excel Programming 2 November 21st 03 11:42 AM
commandbar hunt defj Excel Programming 2 November 17th 03 11:40 PM


All times are GMT +1. The time now is 04:31 PM.

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"