Make Macro Required Password To Run?

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


ADVERTISEMENT

Password Required To View Sheets

Oct 11, 2007

I have a spreadsheet which is used for STAT purposes at work, there are 14 users who use this spreadsheet.

The sheets are named after a user, i.e my sheet is under 'Steve'.

The problem I have is, I have a sheet thats unhidden on the spreadsheet (the rest are all hidden)

What i want is a form to open and request a username and password, or to gain the user name from there windows logon.

After the spreadsheet has recoginsed whom is entering the sheet, i want the spreadsheet to display there individual sheet, and keep everyone elses hidden.

I don't want them to have access to any sheet other than there own.

I then want an administrator logon, where that person can see all sheets.

View 9 Replies View Related

Protecting Cells So That Password Is Required Only To Insert Comment

Dec 3, 2013

I've found many resources that tell me how to allow for the insertion/editing of comments within a protected worksheet. When I protect the worksheet, I can select "Edit objects" to allow anyone to insert comments.

However, my issue is that I'd like the Insert/Edit comment functionality to require a password, and this happens to be the opposite of what those resources instruct. I also want the content in those same cells to be editable by anyone.

View 2 Replies View Related

How To Make 2 Cells On Worksheet Be Required To Be Filled In Before Printing

Dec 19, 2011

We have a form that has a dropdown list of selections but many people forget choose the reasons. How can I make these required fields that HAVE to be filled in in order to print. These are internal forms, nothing on the web. I just need to find a way to make sure that there is a way to stop someone from printing if these 2 fields are not chosen.

View 5 Replies View Related

How To Make Userform That Works As Password Box

Jun 19, 2014

I want to make a user form that works as a password box. I have UserForm1 which is my "Menu" and I created UserForm2, which is my password entry form. The problem I have is that once I click "go" on my password box (which works fine), the Password Box closes but the user form remains open. I want the user form to close as well when I click "Go". So, my password box should close both UserForm1 and UserForm2.

Here is my code:

Private Sub cmdPasswordGo_Click()
Dim UserName, Password As String
UserName = txtUserName.Text
Password = txtPassword.Text
If UserName = "Chad" And Password = "Pass01" Then
Unload Me
Else: MsgBox "Your authentication cannot be validated"
End If
End Sub

My issue is that once UserForm2 is "unloaded", UserForm 1 is "active" but I cannot simply "Unload Me" again, I get an error.

View 1 Replies View Related

Make Individual Sheet In My Workbook Has A Different Password?

Jan 9, 2010

Is there anyway I can make it so that each individual sheet in my workbook has a different password?

View 9 Replies View Related

Macro - Paste Password Into Password Box

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

Macro Calendar Button Required

Apr 29, 2014

I finally managed to create my very own macro calendar BUT it does not fulfill the function that I need it to neither do I no whether it is able to at all.

Basically, I have created a form that I distribute to Line Managers to complete and one of the fields is the date so the first problem with me macro is that it only appears on my PC and secondly I cannot seem to embed it in my workbook as a button. Is this possible?

View 4 Replies View Related

Required Macro To Format The Raw Data

Sep 16, 2009

Iam just trying to format an raw data(which has morethan 40,000 rows) which is converted from notepad to excel.

The major problem the token number which is below the name and quantity i need to bring the number to left side of the row.

i think this has not given an clear picture so iam attaching an sample sheet

View 6 Replies View Related

Insert Page Break Macro Required?

Apr 7, 2005

I have a list of places, i need a macro to automatically insert a page break whenever the street name changes.

View 4 Replies View Related

VB Code Required To Move Macro To Next Row Down Cell

Apr 18, 2014

I have 'sheet 1' (data collection sheet) and 'sheet 2' (form filling sheet)

I've recorded a macro which sends data from 'sheet 2' to 'sheet 1' (linked to a submit button on 'sheet 2')

I want the macro to allow the next form filled information to be transferred onto the next line down on 'sheet 1'.

The current code is:

[Code] ......

View 4 Replies View Related

VB / Macro Required For Stopping Same Number At Same Time

Jul 20, 2014

i want a VB/Macro Code which can do the following...

0 0
1 0
0 1

i just want to enter only the these "values" in the cell of G9 & H9 only and down below by dragging

View 9 Replies View Related

Object Required Error When Running Macro

Apr 28, 2010

I am trying to run the following macro to copy a data range(A1:HX1) range from one sheet(sheet 6) and past it into the next available blank row in another sheet called New_Overall_Input_File but get the following error when I try and run it......."Object Required"?

Sub ALLCARS()
Sheet6.Range("A1:HX1").Copy
New_Overall_Input_File.Range("D" & Rows.Count).Offset(1, 0).PasteSpecial xlPasteValues
Application.CutCopyMode = False
End Sub

View 9 Replies View Related

AZ Or ZA Formula To Replace Macro Method Required.

Apr 18, 2006

The example Spreadsheet shows the current method of Ascending or Descending
Data according to Macro. Is there a way to replace the current Ascending or Descending macro code with a formula for the required cell groups only?

View 2 Replies View Related

Macro Required To Added Week Numbers To Columns ..

Jan 28, 2009

I require is a macro that will check the heading title of each weeks data e.g. WK01, WK02 etc, work out what week it is and input the week number in a new column (Week No) corresponding to that weeks data.

View 2 Replies View Related

Macro Required To Added Week Numbers To Columns

Feb 2, 2009

Every week I get sent a spreadsheet with the hours booked against specific codes, however, each weeks data is in a separate column (from weeks 1-52).

What I require is a macro that will check the heading title of each weeks data e.g. WK01, WK02 etc, work out what week it is and input the week number in a new column (Week No) corresponding to that weeks data and also total the time for that week and enter in the Total Hours column

Please see attached a sample spreadsheet for clarity.

Please also note that I have asked this question before (http://www.excelforum.com/excel-gene...o-columns.html) and DonkeyOte kindly supplied me with the code to work out the week number i.e.

=IF(COUNT($D2:$BC2),SUBSTITUTE(LOOKUP(9.99999999999999E+307,$D2:$BC2,$D$1:$BC$1),"Hrs WK",""),0)+0

however, as the weeks progress I have to manually copy the week number down and add the totals up so I believe a macro would be the best option as I am currently repeating the same task every week.

The macro needs to:-

(a) work out the week number and enter in ‘Week No’ column
(b) macro to copy each weeks data into Total Hours column

I would be most grateful for any assistance in this matter

View 8 Replies View Related

Compile Error (Constant Expression Required) When Using Macro Twice

Apr 1, 2014

I'm trying to use the macro below (twice but with different variables) but everytime I get the error "Compile error: Constant expression required".

[Code]....

View 3 Replies View Related

Macro To Label Folders With Tags And Filter As Required?

Jan 29, 2014

Basically I have a large database of folders of examples of projects/notes etc, each with essentially lots of potential topic "tags". I want to sort them to be able to tell the macro what topic I am looking for and it give me the folders that contain that info. I will need to tag each folder individually (which is no problem). I am looking for a piece of script (that either exists or that I can write) that will do the following:

- tag specific folders with numerous "tags". The folders will all be stored in a database. The tags will be user input.

- sort these folders based on specified tags and show filepath/location/name/file number or something unique based on the tags input.

View 14 Replies View Related

Macro Figure Out The Number Of Rows Required And Adjust If Necessary

Feb 19, 2010

I need the macro to put Rec sheet data for each bank in Sheet Summary under the Each bank header, the macro needs to figure out the number of rows required and adjust if necessary as the rec data is not fixed. See below examples

Rec  ABCDEFG5CategoryRecAccountValue DateEntry DateTypeAmount6CITIBANKCASH AMP1WTGDPFUSD1-Oct-075-Dec-08LDR-2,203.677CITIBANKCASH IMS02WTFPT2USD24-Jun-0817-Dec-08SCR2,001.388JP MORGANCASH DESWTFPT2USDSUSP15-Sep-084-Sep-09LDR-3,608.919RBSCASH DESWTFPT2USDSUSP15-Sep-084-Sep-09LCR3,889,582.9410BOACASH DESWTFPT2USDSUSP16-Sep-0829-May-09LDR-1,557,609.9511BOACASH IMS09ZPBRKQUSD17-Sep-0817-Dec-08LCR4,554,511.1112       13       14        Excel tables to the web >> Excel Jeanie HTML 4

Summary  ABCDEF6CITIBANK     7RecAccountValue DateEntry DateTypeAmount8      9JP MORGAN     10RecAccountValue DateEntry DateTypeAmount11      12RBS     13RecAccountValue DateEntry DateTypeAmount14      15BOA     16RecAccountValue DateEntry DateTypeAmount17      18      19      20      21      22       Excel tables to the web >> Excel Jeanie HTML 4

Summary  ABCDEF4      5      6CITIBANK     7RecAccountValue DateEntry DateTypeAmount8CASH AMP1WTGDPFUSD1-Oct-075-Dec-08LDR-2,203.679CASH IMS02WTFPT2USD24-Jun-0817-Dec-08SCR2,001.3810      11JP MORGAN     12RecAccountValue DateEntry DateTypeAmount13CASH DESWTFPT2USDSUSP15-Sep-084-Sep-09LDR-3,608.9114      15RBS     16RecAccountValue DateEntry DateTypeAmount17CASH DESWTFPT2USDSUSP3970640060LCR3,889,582.9418      19BOA     20RecAccountValue DateEntry DateTypeAmount21CASH DESWTFPT2USDSUSP3970739962LDR-1,557,609.9522CASH IMS09ZPBRKQUSD3970839799LCR4,554,511.1123      24      25      26       Excel tables to the web >> Excel Jeanie HTML 4

View 9 Replies View Related

Macro/Code Required For Calculations Base On Pivot Tables Sum

Jan 29, 2009

What I required is either a Macro or Code for formulas in column 'F' in the attached spreadsheet that correspond to the SUM of each description and divided by 37.5 e.g. in F10 the formula should be =D10/37.5 the formula should be F12 D10/37.5 and so on all the way down the Pivot table

My problem is as the amount data increases on the Data Tab the formulas in column 'F' will become out of line with the corresponding Sum of each description so I guess I need some code or formula that check every time the Pivot table is refreshed.

View 3 Replies View Related

Macro Required To Conditionally Format Cells Automatically, Responce To User Events

May 2, 2008

ABCDEFGHI need to create a macro to perform some conditional formatting1DateDayTypeTimeConfirmed Order No.Site Location2SHEET OVERVIEW301/01/08TuesdayAB4CVertically there will be 366 tables to represent 366 days and Horizontally 10 tables to represent 10 employees,5Dwhich enables the work activities of 10 employees to assigned over the period of a year.6E7AAFIn the type box marked 'A' and 'AA' the user selects from a drop down box a parameter as list below left.8GOn entry of an 'n' in the type box the user can enter data into the 'time','confirmed order','site location' boxes.9HThe idea of having 2 x type boxes is to allow the day to be split into morning and afternoon.10I1102/01/08WednesdayMACRO / VBA FUNCTIONALLITY REQUIRED 1213In the 'type' boxes if the user selects anything other than 'n' then the 4 'site location' boxes and coloured and 14the appropriate text from the list below left is inserted into the 4 associated 'site location' boxes.1516Example:1718Box marked 'A' the user selects 'h'. Boxes marked 'BCDE' and filled with colour and the text holidayBox marked 'AA' the user selects 't'. Boxes marked 'FGHI' and filled with colour and the text trainingType List Entry ParametersWhen the user selects type 'n' after the associated boxes are returned to there blank state (no colour or text)nnormal dayhholidayThe macro/vba would have to respond on everytime a 'type' box changesssickttrainingThere would be 2 x type boxes per day, 366 days a year and for 10 employees. Therefore it would have to monitoruunauthorised absence2 x 366 x 10 (7320) type boxesbbank holidayccompany shutdown

View 9 Replies View Related

Macro To Find Required Data Than Copy/paste In Specific Cell Address

Nov 4, 2009

I want to copy some data from internet and paste it in to worksheet location Range A1:A30. the data look like following information.

LocationKuwaitP.O.Box:4819 SafatAddress:ShuwaikhTel:-22253580Fax:-24343645Category:CONSTRUCTION COMPANIES

the above information have following header ie. Location, P.O.Box, Address, Tel, Fax and Category.

every time one of the header inforamtion is missing ie. Address or P.O.Box, Or Fax, due to this problem every time cell address of information aganist header is change. supose in first copy/paste Tel inforamtion is in A15, but second time it may be on A13, and 3rd time it may be on A17 and so on.

I want to make a macro which search header ("Location", "P.O.Box", "Address", "Tel", "Fax", "Category" ) from a Range A1:A30. than down two steps to copy header information (75325412) and paste in fixed cell location C1:C5 (C1=Name, C2=Location, C3: P.O.Box, C4=Address, C5=Tel, C6=Fax, C7=Category) in same sheet. and repeat the steps to copy information aganist header from all header in Range A1:A30.

View 9 Replies View Related

Macro That Prompts To Chose Files And Copies Them Based On Criteria - Error 424 / Object Required

Mar 6, 2013

I have written a macro that prompts the user to chose some files and if they meet certain criteria, it copies them to a specified folder.However, I have run into this 424 error "Object required".

Code:
Sub FILES2SFTP()
Dim FileNames As Variant
Dim I As Integer
Dim fso As Variant
Dim Data As String
ChDrive "G:"
ChDir "G:TEST"

[code]....

The error is in this line:

If fso.getfilename(FileNames(I).Name) = ("Name1" & Data & ".xls" Or "Name2" & Data & ".xls") Then

View 2 Replies View Related

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 View Related

How To Put Password Into Macro

Feb 4, 2012

how do i put the password of a file into a macro ?

View 4 Replies View Related

Password Protect A Macro

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

Password Protect Macro

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

Simple Password To Run Macro

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

Setting Up Password In Macro

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

Enabling Macro Via Password

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







Copyrights 2005-15 www.BigResource.com, All rights reserved