Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello, I am trying to create a spreadsheet in excel 2003, which has a toggl button on it. When I press the button, I want the sheet to display tw different sets of data, for example, display data in ColumnA and hid ColumnC and vice versa. I am also trying to add protection to the sheet so that when ColumnA i shown, the rest of the sheet is protected, so no data in ColumnC can b deleted accidentally. I think it should be really easy, but I cannot get it work. :( Can anyone provide any assistance? Thanks in advance -- tanktat ----------------------------------------------------------------------- tanktata's Profile: http://www.excelforum.com/member.php...nfo&userid=459 View this thread: http://www.excelforum.com/showthread.php?threadid=55656 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like in the sheet's code module.
Private Sub ToggleButton1_Click() If Me.ToggleButton1.Value = True Then Me.Columns("A").Hidden = False Me.Columns("C").Hidden = True Else Me.Columns("A").Hidden = True Me.Columns("C").Hidden = False End If End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "tanktata" wrote in message ... Hello, I am trying to create a spreadsheet in excel 2003, which has a toggle button on it. When I press the button, I want the sheet to display two different sets of data, for example, display data in ColumnA and hide ColumnC and vice versa. I am also trying to add protection to the sheet so that when ColumnA is shown, the rest of the sheet is protected, so no data in ColumnC can be deleted accidentally. I think it should be really easy, but I cannot get it work. :( Can anyone provide any assistance? Thanks in advance. -- tanktata ------------------------------------------------------------------------ tanktata's Profile: http://www.excelforum.com/member.php...fo&userid=4598 View this thread: http://www.excelforum.com/showthread...hreadid=556566 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks for the help so far. The code you have given only hides an unhides the data. Its the protection of the data that I cant really seem to get working -- tanktat ----------------------------------------------------------------------- tanktata's Profile: http://www.excelforum.com/member.php...nfo&userid=459 View this thread: http://www.excelforum.com/showthread.php?threadid=55656 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() ActiveSheet.Protect DrawingObjects:=True, Contents:=True Scenarios:=Tru -- Bearacad ----------------------------------------------------------------------- Bearacade's Profile: http://www.excelforum.com/member.php...fo&userid=3501 View this thread: http://www.excelforum.com/showthread.php?threadid=55656 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I know how to protect a sheet, but I cant get the toggle button t protect/unprotect a worksheet that contains unlocked cell -- tanktat ----------------------------------------------------------------------- tanktata's Profile: http://www.excelforum.com/member.php...nfo&userid=459 View this thread: http://www.excelforum.com/showthread.php?threadid=55656 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Columns("C:C").Select Selection.EntireColumn.Hidden = True ActiveSheet.Protect DrawingObjects:=True, Contents:=True Scenarios:=True HT -- Bearacad ----------------------------------------------------------------------- Bearacade's Profile: http://www.excelforum.com/member.php...fo&userid=3501 View this thread: http://www.excelforum.com/showthread.php?threadid=55656 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need to Use 1 Button to toggle On or Off | Excel Discussion (Misc queries) | |||
Toggle Button | Excel Worksheet Functions | |||
Toggle Button | Excel Programming | |||
Adding .xla button for Toggle Calculation Button | Excel Programming | |||
Toggle Button | Excel Programming |