Jump to content

SUBIECTE NOI
« 1 / 5 »
RSS
Casa de expeditii

Websockets (Rabbit.js) + RabbitMQ...

Nu vad telefonul (Allview A5) pe ...

TVR pregatește un late night...
 Problema WiFi Tv Samsung UE40ES6710

Daca ai nevoie de prezentari Powe...

[UNDE] Schimbare baterie iPhone 7...

Evolutie rata Prima casa 2016
 Sfaturi achizitionare masina - 13...

Monitoare Samsung S27A350H

Chrome & IE

Ferma animalelor-George Orwell
 SMACH Z / PRO / ULTRA consola por...

SMACH Z / PRO / ULTRA consola por...

Sfaturi/pareri Renault Megane 2 1...

Motorul distruge bujia 3
 

button (activex control) work on protected sheet

- - - - -
  • Please log in to reply
6 replies to this topic

#1
excentryc

excentryc

    Member

  • Grup: Members
  • Posts: 931
  • Înscris: 15.07.2005
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.
code tags


#2
navistar_eagle

navistar_eagle

    Member

  • Grup: Members
  • Posts: 958
  • Înscris: 16.11.2017
Incearca :
 Application.ActiveSheet.Columns(xAddress).Hidden = ToggleButton1.Value


Edited by navistar_eagle, 12 January 2018 - 14:31.


#3
excentryc

excentryc

    Member

  • Grup: Members
  • Posts: 931
  • Înscris: 15.07.2005
nu merge

#4
excentryc

excentryc

    Member

  • Grup: Members
  • Posts: 931
  • Înscris: 15.07.2005
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
navistar_eagle

navistar_eagle

    Member

  • Grup: Members
  • Posts: 958
  • Înscris: 16.11.2017
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.
removed quote


#6
excentryc

excentryc

    Member

  • Grup: Members
  • Posts: 931
  • Înscris: 15.07.2005
O sa incerc ... dar numai luni mai pot ca fisierul e la serviciu.
Merci anyway.

Edited by MarianG, 13 January 2018 - 19:03.
removed quote


#7
excentryc

excentryc

    Member

  • Grup: Members
  • Posts: 931
  • Înscris: 15.07.2005

View Postnavistar_eagle, on 13 ianuarie 2018 - 10:59, said:

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


Merge !

Anunturi


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Forumul Softpedia foloseste "cookies" pentru a imbunatati experienta utilizatorilor Accept
Pentru detalii si optiuni legate de cookies si datele personale, consultati Politica de utilizare cookies si Politica de confidentialitate