Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi experts..
i have an excel report and it had 7 worksheet like sheet1,sheet2... i sent this report to three users with session access. user1 can see the first three worksheet , user 2 can see sheet 7 and sheet 6 , and the user 3 can see sheet 5,6,7.
my problem is when user 1 receive and open the report first three sheet he can see with value and the other sheets shows data disabled
because of the session access but i need fully hide those sheet which is have session access it ll not shows data disabled that ful sheets need hide like below
how can i do this??
Hi,
Apply the macro logic and check
Sub sbHideASheet()
If Sheet1.ProtectContents Then
Sheet1.Visible = False
Else
Sheet1.Visible = True
End If
If Sheet2.ProtectContents Then
Sheet2.Visible = False
Else
Sheet2.Visible = True
End If
End Sub
Regards
Nilanjan
hi nilapril2010
Thanks for your suggetion
how to enable the macro in NPrinting can you please suggesting by proper steps..
Embed the macro in your template.
Modify your template -> Go to Developer->Open the visual besic editor -> Write your macro there.
Private Sub Workbook_Open()
Call sbHideASheet()
End Sub
Sub sbHideASheet()
If Sheet1.ProtectContents Then
Sheet1.Visible = False
Else
Sheet1.Visible = True
End If
If Sheet2.ProtectContents Then
Sheet2.Visible = False
Else
Sheet2.Visible = True
End If
End Sub
Regards
Nilanjan