Custom Toolbar

G

Guest

I have a Toolbar "TBFiles" with custom buttons: There are 12 buttons down
and 5 accross = 60 total buttons. The way I open it is with a custom button
on the Standard Toolbar that when clicked opens a file and runs a macro to
show the toolbar "TBFiles" and then the excel file closes. I am a little
tired of seeing the file open and close. Is there a way to make is so when I
click the command button that the toolbar "TBFiles" will show without having
to see the excel file flash open and close.

Thank you for your help.

Steven
 
L

Lee

I have a Toolbar "TBFiles" with custom buttons: There are 12 buttons down
and 5 accross = 60 total buttons. The way I open it is with a custom button
on the Standard Toolbar that when clicked opens a file and runs a macro to
show the toolbar "TBFiles" and then the excel file closes. I am a little
tired of seeing the file open and close. Is there a way to make is so when I
click the command button that the toolbar "TBFiles" will show without having
to see the excel file flash open and close.

Thank you for your help.

Steven

Use:

Application.ScreenUpdating = False

And then set it back to true before finishing your macro.
 
G

Guest

That does not do it because you still are opening the file to get to the
macro. Is there a way to 1) show the Toolbar without using the macro OR 2)
maybe a way you set a file to open Not Visible?

Thank you for your help.
 
L

Lee

That does not do it because you still are opening the file to get to the
macro. Is there a way to 1) show the Toolbar without using the macro OR 2)
maybe a way you set a file to open Not Visible?

Thank you for your help.






- Show quoted text -

Well, you can open the file as follows:

Dim xlApp As Excel.Application
Dim WB As Workbook

Set xlApp = CreateObject("Excel.Application")

xlApp.ScreenUpdating = False
Set WB = xlApp.Workbooks.Open("C:\Test.xls", False)
WB.Close
xlApp.ScreenUpdating = True
xlApp.Quit

Which creates a new instance of Excel, opens the file, then closes it
and quits the application. If you'd like to open it in the same
instance of Excel, you can use GetObject instead of CreateObject.

I'm a little curious about your description of how you're loading the
command bar. As far as I know, once a file containing a command bar is
loaded, that command bar is installed in Excel. From that point on, it
is just a matter of hiding/showing the command bar (or even enabling/
disabling buttons, which is what I do often) when it is not in use
(i.e. the workbook is closed or, even better, disabled).

Unless I may have misunderstood your description.

Lee
 
G

Guest

The setup here is that I have a Custom Button on the Standard Toolbar that
when you click the custom button it opens custom toolbar "TBFiles".
"TBFiles" is a custom toolbar with 60 custom buttons grid, 12 rows by 5
columns, and because of that it is not something I want displayed all the
time. That is why I put the 1 custom button on the Standard Toolbar. I was
thinking there might be something I a missing in the ability to directly open
a toolbar by clicking a custom button without having to run code from a macro
in a file. If there is, then I would not see an excel file open and close
but would just see the toolbar "TBFiles" display nice and clean.

The best I have come up with is to just minimize the excel file that has the
macro that opens the custom toolbar "TBFiles". I do see a little blip of the
minimized excel header frame when opened but then the toolbar displays and
the little excel blip disappears. If there is not a way to do what I want
then this actually is not a bad way to do it.

Thank you for your follow-up repsonses.

Steven
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top