See if it help I have create a Toggle Button For You ..
-----Original Message----- From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of bpascal123 Sent: Wednesday, July 20, 2011 4:26 AM To: MS EXCEL AND VBA MACROS Subject: Re: $$Excel-Macros$$ excel user form objects Hi Mahesh, Thanks for your help. I'not sure if my first query wasn't confusing. In between, I found another way to deal with this query. My first query was about having one button on let say 10 or more sheets. Each button should be related to the same code. In other words, button.Sheet1=>button.Sheet2=>button.Sheet3=> same code I first wanted to use activeX because it has a toggle button available. But the activeX code goes each time on the worksheet it is located. The alternative would be to use the classical vba button, but there isn't a toggle button as far as i know... Using a classical vba button would be easy since, it is assigned a code that is located anywhere and it can be the same code that was assigned to another button. Thanks for any advices on this... On Jul 16, 7:09 pm, Mahesh parab <mahes...@gmail.com> wrote: > Hi Pascal > > Try: > Private Sub CommandButton1_Click() > Dim ws As Worksheet > For Each ws In Worksheets > ws.Columns("A:A").Hidden = Not ws.Columns("A:A").Hidden > Next > End Sub > > Thanks > Mahesh > > On Sat, Jul 16, 2011 at 11:11 PM, bpascal123 <bpascal...@googlemail.com>wrote: > > > > > > > > > Hi, > > > I would like to know if there is a way to use the same code for an > > activeX toggle button present one time on all sheets in a workbook. > > > For instance, when the toggle button is toggled, it should hide some > > columns and when "untoggled" it should show the hidden columns. Column > > numbers are the same for all sheets so the code for the button present > > on every sheet is the same. > > > Do I need to write the code for every sheet where this object is > > located or can I make it global for the workbook ? > > > Thanks for any help or advice. > > > Pascal > > > -- > > > --------------------------------------------------------------------------- ------- > > Some important links for excel users: > > 1. Follow us on TWITTER for tips tricks and links : > >http://twitter.com/exceldailytip > > 2. Join our LinkedIN group @http://www.linkedin.com/groups?gid=1871310 > > 3. Excel tutorials athttp://www.excel-macros.blogspot.com > > 4. Learn VBA Macros athttp://www.quickvba.blogspot.com > > 5. Excel Tips and Tricks athttp://exceldailytip.blogspot.com > > > To post to this group, send email to excel-macros@googlegroups.com > > > <><><><><><><><><><><><><><><><><><><><><><> > > Like our page on facebook , Just follow below link > >http://www.facebook.com/discussexcel -- ---------------------------------------------------------------------------- ------ Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel
Book1 (Autosaved).xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12