I have 120 sheets in my workbook and I only need 5 of them to save when there are changes, the other 115 are were data is pulled from. Is it possible to tell excel not to look at a sheet when it saves? I'm just after making it save faster.
This is going to be a workbook that " moves" a round a lot, so I want to the 115 sheets in the same workbook.
I have an expense report, which was originally done in Excel 2003. It still prompts users to open as read only however if they select no, they are not prompted for the password, and it has allowed them to save, so when the next person opens it, they have the previous person's report instead of the clean workbook. I have tried everything to put a password onto it. I know this is really basic stuff, but maybe I am missing a step? I want the end user to be able to make all the changes they want in read only mode and then do a save as, but if the select No when prompted "Open as Read-only?" they should have to put a password in.
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.
I'm trying to make a macro check if a file has been saved (ever). If so I want the macro to do a regular save (with already esatablished filename and location) before it proceeds with the rest of the macro. If the file hasnt been saved (if it runs from a new workbook) then I want it to pop up the save.as dialog, so that the user can choose the name and location of the file before the macro continues .
I would like to add some icons on the left side of excel open file pane to faciliate my work. Because i need to load some files under the same folder many times a day. Does anybody know how to do that? I've seen people has more icons on the pane before. The defaut setting has only 'History', 'My Documents', 'Favorites', 'Desktop' and ' My nutwork places' on it.
I have figured out how to save the workbook using a variable to saveas but I would like to create a new folder to place the new workbook into. I have tried a few things a am not having any luck. I recorded a macro and the code it produced is as follows.
I have a sheet which I would like to back up online every time it is saved.
I have a sub, OnlineFile(), which I have used many times without any problems, which creates a .BAT file to use ftp to upload files onto our server. As arguments, it takes the local file path that you want to upload (or download to), the name of the file as you would like it stored, the online file path, and whether you want to upload the file onto the server, or download it off the server.
It should be very easy to combine the two: what I tried was:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, cancel As Boolean) ThisWorkbook.SaveCopyAs ThisWorkbook.Path & "" & "Rubbish.xls" Call OnlineFile(ThisWorkbook.Path & "" & "Rubbish.xls", "Rubbish.xls", "wwwrootexcelfilesMasters", "Upload") Kill ThisWorkbook.Path & "" & "Rubbish.xls" End Sub
Every time I ran this, the file got uploaded correctly, but Excel had a series of problems. Often the code ran fine the first time it was run, but crashed the second time round.
After a fair bit of troubleshooting, I found that the problem came about when the file was trying to save itself - i.e. after the end of the sub. If you pause any macros from running, it still saved fine, but when the code ran, it found errors, froze or closed excel.
My thought at this point was that the code was fragmented or something. I made a new sheet, and retyped just the relevant bits of code (i.e. the BeforeSave sub, the OnlineFile sub and created the form called by OnlineFile). The problem persisted.
I've come up with a workaround for this now (which uses the same OnlineFile sub & form, and works fine), but it's driving me crazy - why does this cause excel to die? Particularly on the second time through? The code seems far too simple to cause such problems - is there a bug in Excel perhaps (I'm using Excel 2000 on Windows XP).
I have plenty of sheets in my spreadsheet but I need some of the sheets to be deleted before it can be sent to client due to sensitive data. Just to be proactive, some time I may not delete the sheet/s before I send it to client...and that means I am fired from my job.
How is it possible that before I save as my master spreadsheet, excel deletes some of the sheets (Names: "Cost", "Contacts","Vendor"), etc.
I have a workbook with several Sheets. I wish to automatically protect all sheets with specific user permissions, i.e. Select Unlocked Cells, Insert Rows, Use Auto Filter and Edit Objects, as I would have available when using the manual approach. Also, I wish to invoke a Password in the process.
Additionally, I need this code to operate when the file is Saved or Closed... transparent to the user.
Our company has designed a Excel Document for quoting purposes. The problem we are having is that certain sheets that are needed to do the quote do not need to be used after the quote is finished and saved. These extra worksheets are taking up a lot of room on our server. In the document I have already disabled the save feature so that the saveas has to be used. Is there code that can delete sheets 3, 5, 6, 7, 8 upon doing a save as?
I will have about 20 excel spreadsheets that will need to be run through some data cleansing and validation than each one exported to a csv file (without the column headings on them), and saved as the same file name as the spreadsheet was. If there are errors in the validation process then the one that fails (row) will be copied to an error log spreadsheet. There will be multiple worksheets in the error log workbook (one for each of the spreadsheets – which I hope VBA can create). What I am doing so far is creating a loop that will run on all of the spreadsheets located within a folder.
'Procucedure that will run all validation processes and error checking on extracteds spreadsheets
Sub RunCodeOnAllXLSFiles() Dim i As Integer Dim wbResults As Workbook Dim wbCodeBook As Workbook Application. ScreenUpdating = False Application.DisplayAlerts = False Application.EnableEvents = False On Error Resume Next Set wbCodeBook = ThisWorkbook With Application.FileSearch .NewSearch..............................
I have a macro in a workbook that starts with one sheet (called Home Page), the macro opens other workbooks and copies sheets to add to the original workbook. When the macro has finished, I would like for a new macro to include all sheets into one PDF file. My problem the finished workbook will have a different number of sheets in it every time.
I have managed to pull together code that does the required task - save two sheets from a work book in to a new workbook on to a dorectory each day. However I woul;d liek to paste special the values and cannot figure our how to reference that on the below:
'saves text file in day on day folder Dim WS As Worksheet, CheminDest As String, fNAME As String 'create directories as needed On Error Resume Next CheminDest = "T:DMRatesReportsChecks" & Year(Date) & ""
I am moving some sheets into a new workbook and from the new workbook I want to prompt the user to save the workbook where they see fit. For some reason I cannot seem to save the new workbook only the old with the below code.
Sub Moving Dim wb As Workbook Set wb = ThisWorkbook Sheets( Array("Hk", "Li", _ "SAM")).Select Sheets("SAM").Activate Sheets(Array("Hk", "Li", _ "SAM")).Copy If wb.Saved = False Then Select Case MsgBox("Do you want to save your changes?", vbYesNo Or vbExclamation Or vbDefaultButton1, "J & R Solutions") Case vbYes wb.Close True Case vbNo wb.Close False End Select End If
I have a multi-sheet workbook with a some raw data that I import into Excel from another system. I then perform calculations & summaries in one of 10 other sheets. In order to make it more readable, I world like put the company logo on the top of each sheet.
Is there a way to create a Input type of sheet that I put the logo in and then on each of reporting sheets do an ='Input'!location_of_logo_cell type of formula, in a similar way that I would pull data from that same sheet, like ='input'A1?. It becomes very labor intensive if I want to make changes to the logo and then copy it to every sheet.
I borrowed the macro below from this forum. My formulas in the sheets I'm copying refer to other sheets that I'm not saving. can someone tell me how to change it so that it copies values only to the new workbook as I'm only saving it for records purposes and some cells are saved with #REF errors.
I'm guessing there's a spot where I should type .Value ? Copy.Value doesn't work.
I am trying to disable the save and save as function using a macro, i know that this in its self is quite simple but i am making VBA create a new workbook and i want this (nameless) workbook to have the save feature disabled.
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