اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

كود اخفاء واظهار اوراق العمل


الردود الموصى بها

السلام عليكم ورحمة الله وبركاته

اخى الشيبانى

استبدل الاكواد الاتيه

Private Sub CheckBox100_Click()
x = InputBox("Please Enter the Pass Word ??")
If x <> "111" Then
Exit Sub
CheckBox100.Value = False
End If
For i = 2 To Sheets.Count
If CheckBox100.Value = True Then
Sheets(Me.Controls("CheckBox" & i).Caption).Visible = False
End If
If CheckBox100.Value = False Then
Sheets(Me.Controls("CheckBox" & i).Caption).Visible = True
End If
Next i
Me.Hide
End Sub

Private Sub CommandButton1_Click()
x = InputBox("Please Enter the Pass Word ??")
For i = 2 To Sheets.Count
If x <> "111" Then Exit Sub
If Me.Controls("CheckBox" & i).Value = True Then
Sheets(Me.Controls("CheckBox" & i).Caption).Visible
End If
If Me.Controls("CheckBox" & i).Value = False Then
Sheets(Me.Controls("CheckBox" & i).Caption).Visible = True
End If
Next i
Me.Hide
End Sub

Private Sub UserForm_Initialize()
Dim CheckB As Control
For t = 1 To Sheets.Count
Set CheckB = Frame1.Controls.Add("forms.CheckBox.1", "CheckBox" & t, True)
With CheckB
.Left = Frame1.Width - 100: .Top = 2 + (t * 20): .Width = 60: .Height = 15: .TextAlign = 3: .Alignment = 0: .Caption = Sheets(t).Name
Frame1.Controls("CheckBox" & 1).Visible = False
End With
Frame1.ScrollHeight = Frame1.ScrollHeight + Frame1.Controls("CheckBox" & t).Height + 10
Next
End Sub

بالاكواد التاليه

Private Sub CheckBox100_Click()
x = InputBox("Please Enter the Pass Word ??")
If x <> "111" Then
Exit Sub
CheckBox100.Value = False
End If
For i = 2 To Sheets.Count
If CheckBox100.Value = True Then
Sheets(Me.Controls("CheckBox" & i).Caption).Visible = xlSheetVeryHidden
End If
If CheckBox100.Value = False Then
Sheets(Me.Controls("CheckBox" & i).Caption).Visible = xlSheetVisible
End If
Next i
Me.Hide
End Sub

Private Sub CommandButton1_Click()
x = InputBox("Please Enter the Pass Word ??")
For i = 2 To Sheets.Count
If x <> "111" Then Exit Sub
If Me.Controls("CheckBox" & i).Value = True Then
Sheets(Me.Controls("CheckBox" & i).Caption).Visible = xlSheetVeryHidden
End If
If Me.Controls("CheckBox" & i).Value = False Then
Sheets(Me.Controls("CheckBox" & i).Caption).Visible = xlSheetVisible
End If
Next i
Me.Hide
End Sub
Private Sub UserForm_Initialize()
Dim CheckB As Control
For t = 1 To Sheets.Count
Set CheckB = Frame1.Controls.Add("forms.CheckBox.1", "CheckBox" & t, True)
With CheckB
.Left = Frame1.Width - 100: .Top = 2 + (t * 20): .Width = 60: .Height = 15: .TextAlign = 3: .Alignment = 0: .Caption = Sheets(t).Name
Frame1.Controls("CheckBox" & 1).Visible = xlSheetVeryHidden
End With
Frame1.ScrollHeight = Frame1.ScrollHeight + Frame1.Controls("CheckBox" & t).Height + 10
Next
End Sub

تقبل تحياتى

رابط هذا التعليق
شارك

السلام عليكم ورحمة الله وبركاته

اشكرك اخى الكريم على هذه الكلمات الطيبه

بارك الله فيك

-------------------------------------

ولكن

ممكن توضيح اكثر

تقبل تحياتى

رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information