Save File Only Through Password

Aug 2, 2007

I tried to research this as much as I could, the thread below is a start but doesnt appear to be close...my request is a bit of a variant to this. I essentially need code that prevents someone from saving the file unless they have the right password.

View 6 Replies


ADVERTISEMENT

Password Protection :: Asking For Password Of An Old Deleted File

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

DAO Query On Password Protected File: Could Not Decrypt File

Dec 9, 2006

I have an existing application that uses DAO sql queries to populate a form. It has always worked fine. Earlier this week, I password protected the spreadsheet. Now my DAO query fails. I get a run-time error '3161'. Could not decrypt file.

' Const stExtens As String = "Excel 8.0;HDR=Yes;"
Const stExtens As String = "Excel 8.0;HDR=Yes;PWD=money16;"

Private Sub Execute_Query(SQL)
'Instantiate the DAO objects.
strDb = ThisWorkbook.FullName
Set DAO_ws = DBEngine.Workspaces(0)
' code fails on the line below
Set DAO_db = DAO_ws.OpenDatabase(strDb, False, True, stExtens)
Set DAO_rs = DAO_db.OpenRecordset(SQL, dbOpenForwardOnly)
End Sub

View 3 Replies View Related

Save Excel File As Another File Using Current Date As Part Of File Name

Oct 10, 2011

VBA coding for automatically saving an excel file as another file using the current date as part of the file name together with "32ga" as a constant add-in. I also what this macro to run at a particular time of the day let say 00:20hrs. The excel file i want to save as is always open . It has data that changes every 24-hrs.

View 1 Replies View Related

Macro To Save Excel Files As PDF With Password

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

Excel 2010 :: Save Open Worksheet To File And Include Date Of Save?

Mar 11, 2014

am using Excel 2010 and having issues trying to save a worksheet to a specified file location with the save date....

I have tried several posts form this forum and elsewhere and can't seem to get the macro to do what I want.....

I want to save a 'worksheet' from an open workbook that I use for updating information to the same file path as the workbook with the date the file saved...

View 6 Replies View Related

Excel Save As Should Default File Save Type To XLSX Using VBA

Aug 21, 2012

What I am trying to do is that I have an excel file with macros and it is a read-only file. In order for the user to save, I want them to only be able to save as a .xlsx file as it disables all macros. If for whatever reason, the user wants to save the file as another .xlsm file, they should be allowed but before they save, a "are you sure you want to save as .xlsm?" message should pop up.

All the options in the save as box should still be available in case they want to save in that particular format. Just that the .xlsx should be the default.

View 2 Replies View Related

Save As Macro :: Save File To Folder

Jan 17, 2010

I have a macro that copy one sheet of the Active workbook and sends it via email.

I need to add a code in this sheet so when one opens it from the email, with a command button to be able to save the file to specific, fixed folder on the local network with it’s original file name.

View 10 Replies View Related

Open Website - Download CSV File / Save As In Specific Folder Under Different Name And File Type

Jul 6, 2012

I am trying to open a website, then for excel to download the csv file, then for it to save it in a specific folder under a specific name and file format (excel).

I am successful at opening the website with the following code, but how to do the rest.

Sub Searchez()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "http://quote.morningstar.ca/Quicktakes/stock/keyratios.aspx?t=clwr®ion=USA&culture=en-CA&ops=clear" 'load web page google.com
IE.Visible = True
While IE.Busy
DoEvents
Wend

'IE.Navigate2 "javascript:SRT_keystuts.exportcsv()"
'this is the name of the download link as from when i hover my pointer over download link.
End Sub

View 1 Replies View Related

Date Function- Open A File, Make An Exact Copy And Save It Under A New File Name

Jun 4, 2009

I'm working on the following
Workbooks.Open Filename:= _
"D:CommondataIBMmainBRANCHBURG-PRODUCTS-BOM-ALUMINUM-UPDATE-" & Ucase(Format(DateAdd("y", 0, Date)), "YYYY-MM-DD")&".XLS"
ChDir "D:CommondataIBMmain"
ActiveWorkbook.SaveAs Filename:= _
"D:CommondataIBMmainBRANCHBURG-PRODUCTS-BOM-ALUMINUM-UPDATE-NAFTA.XLS", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWindow.Close

Date: 2009-06-03

What I'm trying too do is open a file, make an exact copy and save it under a new file name.

My problem is in the date formula the day is not always the same. In the sample case it's 03 at other times the day will change.

is there a way too get this too work irregardles of what the day might be?

View 9 Replies View Related

VBA Code To Require Fields - Temporarily Save File Email It Then Delete Temp File

Apr 9, 2014

I have a spreadsheet where I want to require certain fields to be completed then I want to have that file auto emailed. I have learned that I do need to have the file saved before sending otherwise the data will not appear in the email, so with this I want to have the file temporarily saved emailed then the temp file deleted.

Here is the code I have so far but it errors on the blue text, I did change the TempFileName from = "Copy of " & wb1.Name & " " & Format(Now, "dd-mmm-yy h-mm-ss") to = [C16] & "_" & [B6] & "_" & [D6]

Private Sub CommandButton1_Click()
If Range("B6").Value = "" Or _
Range("d6").Value = "" Or _
Range("f6").Value = "" Or _
Range("E9").Value = "" Or _

[Code] ......

View 1 Replies View Related

Excel Not Allowing To Save File With Uppercase Letters In File Name?

Jan 27, 2014

A co-worker of mine is exporting files from Quickpen as excel files, but every time he names the files with any Uppercase letters in the files name, they are automatically changing to all lower case. Even when he tries to rename the files, they will not stay with any uppercase letters....I have searched all over and cannot find a solution. If he sends ME the file, I can open it in excel and save it with any cases.

View 2 Replies View Related

Save Each Worksheet As PDF File And Name Each File Based On Cell Value In Each Sheet

Jul 10, 2014

I have a Workbook that already has a macro in it that will generate multiple sheets based on certain criteria.

For each of these newly generated sheets (numbered 1-6 in the attached example), I need to be able save each of them to a PDF file based on a unique name contained in a certain cell (in this case, each named is referenced in cell Q1 of each sheet). As such, I should end up with 6 pdfs based on the attached sample files.

The PDFs would ideally need to be landscaped and should be just 1 page per sheet.

In my attached sample workbook, you'll notice that I have a "PracticePrint" macro that doesn't quite get the job done. One other criteria involves not printing any sheet with the characters "1010" in it (my PracticePrint macro is setup to do that, but it fails to do much else).

View 1 Replies View Related

Macro To Save Worksheet As New File Then Return To Original File

Mar 14, 2014

I have a macro which successully saves a worksheet as new file to another file path....(below)...but I can't figure out how to close this new file and return to the original file...

Dim myPath As String, fName As String
myPath = Sheets("Date").Range("C8").Text
fName = Sheets("Date").Range("C9").Text
Sheets("Sage CSV File").Copy
With ActiveWorkbook
.SaveAs Filename:=myPath & fName
End With'

View 2 Replies View Related

VBA (Save As) No Error But File Does Not Save

Oct 10, 2011

I have written the following simple macro to import some data into a worksheet and then prompt the user to save the file in Excel 2003 format (the system to which we will upload this data does not accept formats later than 2003). The template is in "*.xlsm" format.

The code executes without error, but when the user hits the "Save" button in the "Save As" dialog box, nothing happens. The "Save As" box closes, but no file is saved.

Code:
Private Sub cmdImportData_Click()
Dim sFName As String
'On Error Resume Next
PrepData
CopyData
FormatColumns
'prompt the user to save the file in "*.xls" format
sFName = Application.GetSaveAsFilename("upload", "Excel files (*.xls), *.xls")
End Sub

View 3 Replies View Related

How To Put Password For Excel File?

Feb 16, 2010

I searched the forumn but didn't find thread sorry for creating new thread.

frends i have 2 questions.

1) How to put password for excel file (2003) ? (not for sheet)

2) How to remove password from excel file ? (if its not break forum rule).

View 3 Replies View Related

2 Password For One Excel File

Apr 17, 2014

Is it possible for Excel file to be open with 2 password? Like, if password is equal to "Password1" the file can be edited but if password is equal to "Password2" the file will be open as read only, if so, VBA code.

View 1 Replies View Related

VB- Open File With KNOWN Password

Oct 22, 2009

I have a macro that opens Spreadsheet_A, copies the contents to Spreadsheet_Master, closes Spreadsheet_A, then repeats the process for Spreadsheet_B then ss_C then ss_D etc etc etc.....

Each spreadsheet is password protected, and the password is the same for all spreadsheet to stop casual browsing only. I have set the password.

When I run the macro, I have to type the password in each instance, ie 20 or more times for 2 or more files.

Anyone know the code to insert so the spreadsheet opens without my typing the password.

[It's Excel 2007, but I presume the same code as Excel 2003]

View 9 Replies View Related

How To Set SAVE AS File Name To Equal A1 Contents When Rename File

Oct 19, 2005

How can I set the SAVE AS file name to equal A1's cell contents? (More specifically, when I need to rename an existing open file and place my cursor in A1 and hit Save As, I need to new file name to automatically populate A1's cell contents so I don't have to retype the contents of A1.)

View 1 Replies View Related

How To Save File With Correct File Extension (XLS Or XLSX)

Mar 12, 2014

How can I save worksheet from existing workbook as a new workbook with extension .xls or .xlsx depending on the version of Excel on which the original was opened and no matter the extension of original?

My code that I was trying to create all above does not work, because even if I am using Excel 2007, 2010 or 2013 it will still be saving only as .xls.

View 2 Replies View Related

Macro To Select All Worksheet And Save File As File Name?

Mar 6, 2012

I want to create a macro that will select all the worksheets (names and quantity will vary) and saves the file as the current file's name but in PDF. Since I only know how to record a macro it specifies the worksheet names but I need it for various workbooks. The name will vary plus the number of tabs can go anywhere from 3 to 40.

View 9 Replies View Related

Save File As Text Using Cells For Path & File Name

Dec 20, 2009

How to save a file, with file- name. but the directory is to be read in worksheet "towns" in Cell1 (brussels) and filename in worksheet "names" in cell B2 (i.e. winter), so it saves to c:russelswinter.txt as a wordpad or kladblok txt file, that keeps a number, so each time we push a button "go back from worksheet names to worksheet towns" the "number" that is saved in the txt document goes up by value +1. In Flemisch, the "old" code goes as follows, and saves the number in the txt file Factuurnummer7.txt. But I want that the file name (here: FactuurNummer7) can be a variable text issue, which has to be read - as already noticed - in cell B2 (with the word WINTER). So the are 2 worksheets: towns, ans names

pad$ = Application.DefaultFilePath
'controle = Dir(pad$ + "FactuurNummer7.txt")
'If controle = "" Then GoTo EerstAanmaken
'Open pad$ + "Factuurnummer7.txt" For Input As #10
'Input #10, Nummer1
'Close #10......................

View 2 Replies View Related

Macro: Save File & Automatically Overwrite Old File

Oct 11, 2006

I presently have a macro that, when run, takes to conents of C4 and C6 and saves a new version of the file being worked on into a folder on my desktop. I love the macro with the exception of one part: I don't want to be prompted to overwrite the file if it already exists. How can I change this macro so that, when pressed, it overwrites the file without prompting the user and waiting for their answer?

Here is the current

Sub SaveIt() ...

View 3 Replies View Related

Unable To Open XLS File Without Password?

Feb 5, 2013

I have a certain .xls file which is password protected.

Now i have forgot the password for opening the file. Is there any other way of opening the file without password or using a Macro.

View 2 Replies View Related

Removing A Password From A Corrupt File?

Sep 30, 2013

Is there anyway I can remove the password from a corrupt file that I cant access so that I can use Stellar Pheonix Excel Recovery to repair it?

View 8 Replies View Related

VBA To Open File And Enter Password

Jun 24, 2014

I have the following line of code to open a file and enter the password to allow modifications.

When I run the code the file opens but then the password isn't entered.

View 2 Replies View Related

Function Call To Set The Password Of The File

Apr 23, 2007

I found a function to set the password a an excel file:

=========================================
Function SetPwd(strNoPwdFile As String, _
strPwdFile As String, _
Optional strOpenPwd As String, _
Optional strModPwd As String) ' As Boolean
' This function requires the following arguments:
' strNoPwdFile - The path to a document without a password.
' strPwdFile - The path and name to save the password-
' protected document.
'
But the compiler said that it is syntax error.

How can i rectify the error?

View 9 Replies View Related

Ignore File Name / Save File Name Different If Other Exists?

Jun 6, 2014

My macro pulls data from a set of files in a folder and creates an output based on my formatting rules.

Ran into 2 issues though. The first being is after this macro is run it saves a file in the folder with the name "Data Export" and before I had it do this if "Data Export" was already there

Code:
'Check if file name to save exists If Dir$(vFolder & "" & sSubFolder & ".xls", vbNormal) = "" Then
wb.SaveAs vFolder & "" & sSubFolder & ".xls"
MsgBox "Complete!", vbOKOnly
Else
MsgBox "File already exists, could not save!", vbInformation, "COMPLETE!"
End If

What I want it to do instead is change itself and save it as Data Export A, and then also loop for A each time, if A is there go to B , so on and so forth.

-Alternate solution if this is way to challenging, can I have it pop up the Save Message box to let the user try a new name if "Data Export" exists. I was trying to think through that too..

2nd Issue is when I loop the files in the folder I selected in my macro, I want it to ignore "Data Export" files. Before I just took a shortcut and had it save outside of the data folder, which was fine but now we are running on so many files a day that we need it inside the same folder for organization purposes.

That is done with the following

Code:
'Loop through files in folder sFileName = Dir$(vFolder & "")
Do Until sFileName = ""

I was thinking maybe I can add an error handler to the loop? Before Do Until? Something like this? But how I can add it into the loop?

Code:
If sFileName Like "????.?.xls" Then

View 4 Replies View Related

Password Protect File With Read Only Button?

Jul 12, 2012

My boss has come to me and asked how does she get her file to go back to the way it was before, she had a password on the file but you used to be able to click on a button that said "Read only" this button no longer appears and i am unable to get it back. I still get the password box pop up but it is smaller and does not contain the read only button.

View 3 Replies View Related

How To Review Who Has Opened A File With Password And Made Changes

Apr 17, 2013

I have a master file which users are able to open via read only or go in via password to edit.

I'm not too bothered on the read only users more on person's entering the file via password, making any changes and then saving those changes.

Is there a way to trace what changes they made and would their name be saved as the new "author" of the file?

View 4 Replies View Related







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