Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Letting buttons depend on the sheet?

I'm using Excel 2007. I wonder if it's possible with VBA to have different buttons appear for different sheets? That is, when I go from one sheet to another, some buttons shall disappear and some shall appear, so that only the set of buttons relevant to the active sheet is visible. If this is not possible, are there other ways to achieve something similar?

Gustaf
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Letting buttons depend on the sheet?

Gustaf wrote:
I'm using Excel 2007. I wonder if it's possible with VBA to have
different buttons appear for different sheets? That is, when I go from
one sheet to another, some buttons shall disappear and some shall
appear, so that only the set of buttons relevant to the active sheet is
visible. If this is not possible, are there other ways to achieve
something similar?


Just to clarify, I'm talking about toolbar buttons that activate custom VBA macros.

Gustaf
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Letting buttons depend on the sheet?

Excel 2007 doesn't have toolbar buttons so I presume you're talking about
adding custom buttons to the ribbon, either a build-in tab or a custom tab.
Having such buttons appear and disappear when switching worksheets would
take a combination of RibbonX and VBA. If you've already build your ribbonx
you'd just have to use the getVisible callback to return the current visible
state when the ribbon is invalidated. And you'd have to invalidate the
ribbon with the sheet activate or deactivate event.

If you're not all that familiar with customizing the ribbon you can either
drive into it or, if you haven't got the time, maybe you could just insert
buttons from the Developer tab directly on the worksheets and hook your
macros to them.

--
Jim
"Gustaf" wrote in message
...
| Gustaf wrote:
| I'm using Excel 2007. I wonder if it's possible with VBA to have
| different buttons appear for different sheets? That is, when I go from
| one sheet to another, some buttons shall disappear and some shall
| appear, so that only the set of buttons relevant to the active sheet is
| visible. If this is not possible, are there other ways to achieve
| something similar?
|
| Just to clarify, I'm talking about toolbar buttons that activate custom
VBA macros.
|
| Gustaf


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
Mouse is not letting go of a cell Leah Excel Discussion (Misc queries) 1 June 16th 08 07:29 PM
WHY IS THE OFFICE CLIPBOARD NOT LETTING ME COPY AND PASTE? FtWorthDave Excel Discussion (Misc queries) 3 February 13th 07 09:54 PM
'Copy to' Advance Filter depend only on sheet ID not start sheet Sandy Yates Excel Worksheet Functions 0 April 4th 06 03:48 AM
How to show data from other sheet depend on value?? Malka Excel Worksheet Functions 3 February 27th 06 08:51 AM
Not letting me import XML data Rob Excel Worksheet Functions 0 December 3rd 04 01:15 AM


All times are GMT +1. The time now is 05:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"