button (activex control) work on protected sheet
Last Updated: Jan 16 2018 12:53, Started by
excentryc
, Jan 12 2018 13:31
·
0
#1
Posted 12 January 2018 - 13:31
Salut!
Am un sheet ptrotejat dar butonul de hide/unhide a coloanelor P:V nu mai functioneaza decat daca deprotejez foaia de lucru. Codul mai jos: Private Sub ToggleButton1_Click() Dim xAddress As String xAddress = "P:W" If ToggleButton1.Value Then Application.ActiveSheet.Columns(xAddress).Hidden = True Else Application.ActiveSheet.Columns(xAddress).Hidden = False End If End Sub Ce trebuie sa fac?
Edited by MarianG, 12 January 2018 - 14:24.
|
#2
Posted 12 January 2018 - 14:30
Incearca :
Application.ActiveSheet.Columns(xAddress).Hidden = ToggleButton1.Value Edited by navistar_eagle, 12 January 2018 - 14:31. |
#4
Posted 12 January 2018 - 15:52
am incercat asta si a mers
Private Sub ToggleButton1_Click() Dim xAddress As String xAddress = "P:W" ActiveSheet.Unprotect "" If ToggleButton1.Value Then Application.ActiveSheet.Columns(xAddress).Hidden = True ActiveSheet.Protect "" Else: Application.ActiveSheet.Columns(xAddress).Hidden = False ActiveSheet.Protect "" End If End Sub Edited by excentryc, 12 January 2018 - 15:59. |
#5
Posted 13 January 2018 - 10:59
testeaza de curiozitate asa:
Private Sub ToggleButton1_Click() Dim xAddress As String xAddress = "P:W" ActiveSheet.Unprotect "" Application.ActiveSheet.Columns(xAddress).Hidden = ToggleButton1.Value ActiveSheet.Protect "" End Sub
Edited by MarianG, 13 January 2018 - 19:03.
|
#6
Posted 13 January 2018 - 15:16
O sa incerc ... dar numai luni mai pot ca fisierul e la serviciu.
Merci anyway.
Edited by MarianG, 13 January 2018 - 19:03.
|
#7
Posted 16 January 2018 - 12:53
Anunturi
Bun venit pe Forumul Softpedia!
▶ 0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users