Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a button on a protected sheet which will allow the user to delete
a row. The button enabled feature is set to false initially. I would like to enable the button when the user selects a row or multiple rows. Then they can delete the selected rows & the sheet will be protected again. Any help on this would be greatly appreciated, Regard's, Johnnyb --- Message posted from http://www.ExcelForum.com/ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Wouldn't this mean that you (Excel) would have to continually check to
see if anything has been selected on the worksheet? I think it would be easier to always have the button ENABLED, and add code as part of the deletion routine to check that the user has selected valid and/or entire rows for deletion. Sean "Just press the off switch, and go to sleep!" *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
right click on the sheet tab and select view code. Paste in code like
this: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Address = Target.EntireRow.Address Then CommandButton1.Enabled = True Else CommandButton1.Enabled = False End If End Sub -- Regards, Tom Ogilvy "Johnnyb " wrote in message ... I have a button on a protected sheet which will allow the user to delete a row. The button enabled feature is set to false initially. I would like to enable the button when the user selects a row or multiple rows. Then they can delete the selected rows & the sheet will be protected again. Any help on this would be greatly appreciated, Regard's, Johnnyb --- Message posted from http://www.ExcelForum.com/ |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nice one Tom, Thanx
Tom Ogilvy wrote: *right click on the sheet tab and select view code. Paste in cod like this: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Address = Target.EntireRow.Address Then CommandButton1.Enabled = True Else CommandButton1.Enabled = False End If End Sub -- Regards, Tom Ogilvy "Johnnyb " wrote in message ... I have a button on a protected sheet which will allow the user t delete a row. The button enabled feature is set to false initially. would like to enable the button when the user selects a row or multipl rows. Then they can delete the selected rows & the sheet will b protected again. Any help on this would be greatly appreciated, Regard's, Johnnyb --- Message posted from http://www.ExcelForum.com/ -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I activate an option button? | Excel Discussion (Misc queries) | |||
button in a cell to activate a macro | Excel Worksheet Functions | |||
How do I lock a radio button group if a N/A button is selected | Excel Discussion (Misc queries) | |||
button to activate userform | Excel Programming | |||
How to activate the button | Excel Programming |