Password And Macro
Sep 30, 2009
I have an excel spreadsheet that has password to open it as well a read only prompt. What I would like to happen is after the user has typed in the password, clicked ok, and then clicked either "yes" or "no" for read only or not that a specific named macro immediately is run.
View 4 Replies
ADVERTISEMENT
Nov 28, 2008
I am havng problems with the belwo macro code -
Range("G7").Select
Selection.Copy
Workbooks.Open Filename:= _
"Q:PublicPAYMENTS Q&RREPORTSSuspense Activity BUSINESS2008 - Suspense BUSINESS - Activity Reports2008 Avon.xls"
Application.CutCopyMode = False
ActiveWorkbook.Save
ActiveWindow.Close
End Sub
When i open the workbook it requires me to insert a password, i tried to type this but excel will not follow keystrokes, i then inserted the password in cell G7 which i then copy and paste, which you can see the copy at the beginning of the macro.
Is there a way where you can get it to insert the password so i can open the workbook in a macro.
What im trying to do is save 26 suspense spreadsheets by just clicking on a macro.
View 9 Replies
View Related
Feb 4, 2012
how do i put the password of a file into a macro ?
View 4 Replies
View Related
Oct 24, 2007
I currently have a macro which i run by selecting tools, macro, macro and then selecting the one i want and pressing run. if i press run I want a box to appear asking me to input a password and if password matches then run that specific macro, can this be done
View 2 Replies
View Related
Oct 22, 2008
Is there a way to password protect the macro code, so that someone can't open the coding?
View 4 Replies
View Related
Aug 3, 2007
i need a way for a simple input box to come up and request a single generic password prior to runing a macro
View 9 Replies
View Related
Aug 2, 2008
I have set up a form with the following macro with a password. The Macro works fine, but When the user enters the password it appears on the screen. I want the password to be seen as ************ on the screen. Please amend my macro, so that when the user enters the password, it appears as ********** on the screen
Private Sub CommandButton1_Click()
If Me.txtpass.Value "Mike1" Then
MsgBox "Incorrect Password!"
Exit Sub
Else
Me.Label3.Visible = True: Me.Label4.Visible = True
Me.ComboBox1.Visible = True
Me.CommandButton2.Visible = True
Me.ComboBox2.Visible = True
End If
End Sub
View 9 Replies
View Related
Mar 23, 2007
I have a shared workbook with four buttons executing different macros. Problem is that some of the users should only be able to use two of the buttons. To avoid that they accidently press the "restricted buttons" i would like a password (or keyboard shortcut) to enable these.
View 9 Replies
View Related
May 3, 2007
I need to put together a macro, which will be assigned to a command button, that will prompt the user for a pre-specified password, and, if the password is correct, return a pre-specified value in a different cell. Is there any way to do this?
To put it in perspective, at my company we have approval sheets that need to be signed by several executives that are scattered all over the building. The first executive gets the copy, signs it, sends it off, etc. They tend to dissappear on occasion, so we are looking to make it all electronic, where they can access the file in a shared folder, and the if they enter their password correctly, their initials are input into the specified cell. They can than save the file for the next executive to do the same.
View 5 Replies
View Related
Aug 1, 2007
i have a spreadsheet with about forty different sheets and all of these sheets are protected with the same password, and wheni come round to doing an amendment to the spreadsheet i have to unprotect and then re protect each sheet in turn, very time consuming
each sheet is naturally named different
View 9 Replies
View Related
Dec 8, 2008
I have a button that executes a macro which basically activates a worksheet. I wish to put a password which would allow only certain users to access this worksheet through this button.
View 2 Replies
View Related
Feb 11, 2009
I am trying to complete a toolbar that will lock and unlock all the sheets in a workbook. While I can set the password automatically I'd like to have the macro ask for the password instead of hardcoding it.
Here is the code I currently have and works so long as I have already set the password in the workbook to match what is in the macro
View 3 Replies
View Related
Sep 10, 2009
I have recorded the following macro and wish to add unprotect (with password), run the macro - which formats the worksheet and then password protect all cells with the exception of range E15:H413 which I want to leave editable by users.
View 9 Replies
View Related
Mar 28, 2012
I am trying make a macro required a password to run.
I found this code below but not sure how to use it. I would like to be able to run it from a command button.
Sub MPW()
Dim My Password
My Password = InputBox("Please enter password", "Password Prompt", "********")
'Hardcode password
If MyPassword = "password" Then
MsgBox "Access Granted", vbInformation, "Access"
'call macro
Exit Sub
Else
[code]...
View 3 Replies
View Related
Nov 24, 2006
i currently have created a macro for copy a selection of cells from one work book to another. The file were i am copying the cells from is Track_&_Trend_00.xls. In this there is a password to open and modify. The sheet that the cells are being pasted to is TRACK & TREND.xls. There is no password on this. My macro runs fine only that midway through it asks for the password to open and the password to modify for the sheet Track_&_Trend_00.xls.
I wonder ifany one would know about entering input lines of code below to automatically put these passwords in and not having the two password dialog boxes pop up midway through running the macro.
Range("A8").Select
ChDir "T:Track & Trend"
Workbooks.Open Filename:= _
"T:Track & TrendTrack_&_Trend_00.xls"
ActiveWindow.SmallScroll Down:=-102
Range("A8:S115").Select
Selection.Copy
Windows("TRACK & TREND.xls").Activate
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWorkbook.Save
View 9 Replies
View Related
Feb 26, 2007
My macros are set up with hard-coded passwords to protect and unprotect the sheets where they run.
But I need a way for the macros to refer to a user-provided password without having the user edit the macos themselves. The simplist approach (I suppose) would be to have a worksheet for this with a cell for the user to enter the password he/she wants. The macro protect/unprotect code would then look at the cell to get the password.
View 9 Replies
View Related
Dec 31, 2004
Here is my macro, how do I add the password to make it work properly?
Sub unprotect()
' unprotect Macro
' Macro recorded 12/30/2004 by '
ActiveSheet.unprotect
ActiveWorkbook.unprotect
End Sub
Both the sheet and the workbook are protected and use the same password
jiuk - code tags added
View 4 Replies
View Related
Dec 5, 2006
i want to make a macro available just for me with help of a password, so that the other users can't run this spesific macro without this password.
View 5 Replies
View Related
Jul 25, 2007
I have a workbook with the following
Sub Workbook_Open()
Sheets("Occ-Rent-Concess Worksheet").Select
ActiveSheet.Unprotect Password:="pass"
ActiveSheet.Select
Cells.Locked = True
ActiveSheet.Protect Password:="pass"
pass:
UserName = InputBox("Enter Log On Name to Continue..............................................
This code opens a msgbox that asks for a password and then unlocks certain cells based on what the password is. I have 140 of these workbooks. I need to be able to open them all and change one cell in each file, save it and close. I've gotten the macro written to open, change and save the files, but I am still having to type the 'password' 140 times. Is there a way to bypass it?
View 4 Replies
View Related
Jan 31, 2008
I need my people to run all kinds of macros, but I want to password protect one of them.
View 6 Replies
View Related
Jul 12, 2013
I have a spreadsheet with over a hundred tabs, each of which need to be password protected (same password).
I found code on CFO.com that got me half way there. It protects all the spreadsheets, but it does not password protect the macro itself, meaning that anybody can step into the macro and unlock everything at the click of a button.
The code looks like this.
VB:
Sub ProtectAllSheets()
For Each ws In ActiveWorkbook.Worksheets
ws.Protect Password:="secret123"
Next ws
MsgBox "All Worksheets Protected"
[Code] ....
What can I do to prevent people from stepping into the macro, or prompt a password to actually use the macro itself?
View 1 Replies
View Related
Feb 26, 2009
I have created an Excel sheet that retrieves data from a ODBC source. I have created a macro using macro recorder to refresh the data by re-connecting to the database. However, the connection requires a password prompt and when the macro is run, you are still required to enter the password.
Is there anyway to make the macro so that the password is automatically entered and the user will just have to press a button to fully run the query update?
View 2 Replies
View Related
Nov 29, 2009
I have written a macro to select a range of cells one by one and open the excel files mentioned in them and execute a task. It works fine. But I want the system to see if the file exists in its folder or if the file is password protected (for opening). Either of the case the file should be skipped without a warning message and any attempt to open. I need a macro for that. Following is the way the cell contents are
I:ORDERSS-S 10ALIYAMARKET ORDERSADDADD-LADIES-LEGGINGS-13246.xls
I:ORDERSS-S 10ALIYAMARKET ORDERSADDADD-LADIES-PANTS-13247.xls
I:ORDERSS-S 10ALIYAMARKET ORDERSADDADD-LADIES-SHORTS-13244.xls
I:ORDERSS-S 10MICHELLEGAMESWORLDWIDE COMPANYWORLDWIDE COMPANY - GAMES - 10014.xls
And following is the VBA code I wrote. It it almost stops when reaching a non-existing file name
View 2 Replies
View Related
Mar 3, 2014
I am looking to convert 2000 excel files in PDF and include a unique password (password ideally will be their employee number). Is this possible using VBA, I am thinking that if I have a seperate excel file with the name of each file and the applicable password it might be but not sure?
View 3 Replies
View Related
Dec 10, 2006
I'm trying to protect a worksheet with a password using macro.
View 9 Replies
View Related
Jan 26, 2007
I have a macro in a workbook (good start) as follows:
Sub UnhideSheets()
' Set to Auto Calc mode
With Application
.Calculation = xlAutomatic
End With
' Asks for a password (must be "unhider")
Dim mypass, response As String
mypass = Application.InputBox("This macro requires you to enter a password to proceed." & vbCrLf & "Please enter password below.")
' If password is correct
If LCase(mypass) = "unhider" Then
' Unhides all sheets
Dim i As Integer
For i = 1 To Sheets.Count
Sheets(i).Visible = True
Next i
' Then tells you that all is OK
response = MsgBox("All sheets unhidden", 0, "Macro run")
' Otherwise
Else
' Tells you that there is a problem (Unauthorised to continue)
response = MsgBox("Sorry, you are not authorised to use this macro.", 16, "Macro stopped")
' hides the sheet again
Sheets("BSG Only!").Visible = xlHidden
Sheets("CC07").Activate
' And ends the "if"
End If
End Sub
This unhides the "very hidden" sheets that make the book work and is password protected because I want to limit the people who can see this data.
What I would like to do, however, is call this macro remotely from another procedure in a separate book, which can only be accessed by those who are authorised to see the hidden data.
Essentially, then, my question is: "How do I call the protected procedure without the user having to enter the password each time, as they must be authorised to have access to the procedure that calls the protected procedure?"
View 3 Replies
View Related
Mar 4, 2007
Stumbling over syntax on what should be easy. I want to password protect the active sheet using plain vanilla user input box; and then unprotect ALSO via an input box. Doesn't matter about masking the input with **** or whatever. Based on responses below, here is macro code I used:
To protect the sheet:
Sub ProtectSecurity()
Dim pword As String
pword = InputBox("Enter Password", "Password")
ActiveSheet.Protect pword
End Sub
---------------------------------
To Unprotect the sheet:
Sub UnprotectSecurity()
Dim pword As String
pword = InputBox("Enter Password", "Password")
ActiveSheet.Unprotect pword
End Sub
View 5 Replies
View Related
Nov 12, 2009
Macros are just not my strong suit. I can usually find my answers here but this one has me stumped. I have rewritten this thing everywhich way but loose and this is my latest version.
Sub SetProtect()
'
' protect Macro
' prompts for password protection
'
' Keyboard Shortcut: Ctrl+p
'
Dim Response As String
Dim Answer As Integer
SetProtect:
Response = InputBox("Enter password")
If Response = "safety2" Then.......
View 9 Replies
View Related
Sep 16, 2006
I need to create a button in an Excel workbook that does the following.
1) Asks for password
2) Uses that password to unlock the workbook
3) Runs a macro that does the following
a) Shows sheet tabs turned off via unchecking the box in options
b) Unhides 3 hidden tabs
View 9 Replies
View Related
May 27, 2009
When opening a new Excel file, it is asking me for a password to an old excel file that was password protected, which I have deleted from my computer. It is still asking for this password every time I open a new or existing file. When I hit cancel it lets me open the file.
View 11 Replies
View Related