Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hide Toolbars in Excel OLEContainer

510 views
Skip to first unread message

Mark Button

unread,
Mar 1, 2001, 2:38:43 PM3/1/01
to
Hi,
Could anyone plase help me hide/remove the toolsbars from an OLEContainer
that has an Excel spreadsheet contained within it.
When the OLEObject is 'edited' the standard toolbars appear and destroy the
whole look of the MainForm.I just want to get rid of them.

Help!
Thanks in advance.
Mark


Shannon Broskie

unread,
Mar 1, 2001, 2:54:42 PM3/1/01
to
We we in need of doing the same... Here's the code...
Worksheet Menu Bar was an exception since it really wasn't visible and gave
an error when
setting it's visible property to false;

Ole is the TOleContainer...

var
ExcelApp : Variant;
intCount : integer;
begin
Ole.DoVerb (Ole.ObjectVerbs.IndexOf ('Edit'));

ExcelApp := Ole.OleObject.Application;

for intCount := 1 to ExcelApp.CommandBars.Count do
if (ExcelApp.CommandBars.Item [intCount].Visible) and
(ExcelApp.CommandBars.Item [intCount].Name <> 'Worksheet Menu Bar')
then
begin
ExcelApp.CommandBars.Item [intCount].Visible := False;
end;
end;


"Mark Button" <mbu...@atimwp.com> wrote in message
news:3a9ea571$1_1@dnews...

0 new messages