Hi all,
I have multiple macros on a workbook which I need to protect how do I enable the use of the macros whilst protected?
D
Hi all,
I have multiple macros on a workbook which I need to protect how do I enable the use of the macros whilst protected?
D
In 'ThisWorkbook' module:
(enabling the execution of macros on a secured workbook)
In module 'Module1' (at the top of module)Option Explicit Private Sub Workbook_Open() Dim wsht As Worksheet For Each wsht In ThisWorkbook.Worksheets wsht.Protect Password:="secret_password_from_cia_and_fbi_and_nsa", UserInterFaceOnly:=True 'and other parameters Next End Sub
(hiding the macro preview)
In editor vba (alt+f11), see image.Option Private Module
(to protect macros from unauthorized browsing)
I'm not sure what I need to do here....?
1. open your workbook
2. press alt+f11
3. in the vba editor, in the left panel (Project - VBAProject) select the module "ThisWorkbook"
4. paste the "Workbook_Open" procedure code here (with your own password)
Optionally, in the 'Module1' module enter the 'Option Private Module' clause, to hide macros from prying eyes, as well as you can protect the vba editor using a password.
Last edited by mjr veverka; 01-28-2018 at 02:33 PM.
Thanks got your help, works fine
Hi again,
I thought this worked but it didnt, im really not getting it, this is my code what do i paste in and where?
Sub reset()
'
' reset Macro
'
'
Cells.Select
Selection.EntireRow.Hidden = False
Range("D6").Select
End Sub
Sub search()
'
' search Macro
'
'
Cells.Select
Selection.EntireRow.Hidden = False
Range("D6").Select
Calculate
End Sub
And what exactly do you want to do (because you mark minimum millions of cells, and then you're trying to unhide minimum tens of thousands of rows) ?
Old excels = 16,777,216 cells = 65,536 rows x 256 columnsCells.Select Selection.EntireRow.Hidden = False
New excels = 17,179,869,184 cells = 1,048,576 rows x 16,384 columns
Sorry for the late reply, thanks for yopu help - I saw my mistakes and took your advice in the size of the actions.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks