Jump to content

SUBIECTE NOI
« 1 / 5 »
RSS
Intrebari despre autism

Imprimare coperta carcasa DVD.

La ce risc ma supun?Suplimente mu...

Tinerete fara batranete si viata ...
 Ursula Sandner-Puterea ta interio...

Vi se pare normala pedeapsa primi...

Cactusii, hrana pentru oamenii de...

The New Colleague - BRomania
 Este necesara procura de la celel...

Repartizare camere la hotel

Autoturism SH 4500E

Kadebostany - Early Morning Dreams
 Casa Brutale

Melodii, solouri pt. chitara acus...

Site romanesc care vinde (si) pro...

De ce tot mai multe marci feminin...
 

button (activex control) work on protected sheet

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

#1
excentryc

excentryc

    Member

  • Grup: Members
  • Posts: 908
  • Î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: 908
  • Înscris: 15.07.2005
nu merge

#4
excentryc

excentryc

    Member

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

Vizualizare mesajnavistar_eagle, pe 13 ianuarie 2018 - 10:59, a scris:

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


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