Userform - Insert File's Last Saved Date
if there is an easy way of showing the active file "Last Saved Date" on a Userform and have it show automatically when the Userform is opened? The Scenario is:
I have a "Main" userform screen and I want to have a text line which says, "File last updated on xx/yy/zzzz ". This must show up automatically when the "main" userform is opened.
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Tip To Show 'last Saved' Date On Worksheet
how I can have the latest date a file was saved showing on the worksheet? For example, I open a worksheet that was last saved on Sept 22nd, and after updating it today, I save it and want the date to show today's date? I'm pretty sure I've seen it in some files in my working life, so would appreciate advice on this!
View Replies!
View Related
Open File With Last/Lastest Saved Date
I'm looking for a code which is checking the file name first before opening and operating on it. File name format is filenameyyyymmdd.xls but the problem is files in that directory are saved irregularly (couple times a week) and I need to open the newest saved file.
View Replies!
View Related
Doesn't Work If The Worksheet Hasn't Been Saved Yet
I'm trying to simplify a formula that I'm using in a spreadsheet that's being used mostly in Excel 2000. 2 reasons I'm doing this: 1) It doesn't work if the worksheet hasn't been saved yet. 2) It's ugly =DATE(YEAR(DATEVALUE(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,3) & " 20" & MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+5,2))),MONTH(DATEVALUE(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,3) & " 20" & MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+5,2)))+1,0) The formula returns the last day of the month of the name of the sheet. For example, if the sheet is names "Mar 07", it returns 3/31/07. (yeah, when the 2100 issue becomes a big deal, I'm not going to be ready but I have 92 years to think about it) Even if I can't make it prettier, does anyone have a way to get the sheet name into a formula without VBA Code in a file that hasn't been saved.
View Replies!
View Related
Run-Time Error '1004' Cannot Open PivotTable Source File 'Consolidated Report'
I have a macro that takes the date from different excel sheets, consolidates the data and renders the pivot table and chart accordingly. It was working fine when the date range defined for the pivot table was static. Now I have made it dynamic since the data range changes each month depending on the number of days it has got. When I run the macro, it runs succesfully, generates the report and save & close the report, but after that I am getting this error. Errorneous
View Replies!
View Related
Changes Aren't Saved While VBE Is Protected
I have a WorkBook of 13 sheets it has 2 Modules: one unraveling protection from cells protected and restore it to all Sheets in a single step And the second controls printing process to make it only for rows that conaining date in the predetermined columns that latter is to break the protection, execute printing and re protection again without user intervention The strange thing is : after protecting these modules from being viewd by users as it contains THE PASSWORDS .....
View Replies!
View Related
Show UserForm If Template Saved As Workbook .xls
I have created a template with a form. Now I'm using (the code is in ThisWorkbook) Sub Workbook_Open() frmMyForm.show End Sub This runs the form also when opening the template or a saved workbook based on the template. I want the form to run only when creating a new workbook based on the template. How do I do?
View Replies!
View Related
File Cannot Be Saved In This Format
I have a file with code attached and when I try to save it I am told that the file cannot be saved in this format and that I must unprotect the code before saving. I have no OnEvent macros in the code. Does anyone have a solution for this problem. The code must be protected, non-protection is not an option.
View Replies!
View Related
File.Saved Changing
I have a file that keeps setting it's "Saved" property to False when I change something in another file. I cannot find any external links in the file. The file used to be "Personal.xls", but I renamed it.
View Replies!
View Related
Inadvertently Saved Over An Important File
I'm not sure how I did it, but I opened up a new Excel file and accidentally saved it over a file I've been working on all afternoon. Is there any way to recover the original file (per the last time I saved it about 20 min ago)? I looked in the "wastebasket" and only found files that I had specifically DELETED. But I didn't specifically delete this one, instead I saved over it.
View Replies!
View Related
Deleting Code On The Saved File
I have a template that when it is opened it will automatically save the file to a specific location with the date in the file name. Currently my code is Private Sub Workbook_Open() ActiveWorkbook.SaveAs "G:Shared"IT_New " & Format(Date, "mm-dd-yy") & ".xls", , , , , , xlShared End Sub Does anyone know a way to have this code disabled (either by deleting or making it all a comment) on the saved file (xls) so the speadsheet does not try and overwrite itself when I go back and open a previous days spreadsheet?
View Replies!
View Related
Data In Cells Saved Into File Name
vba to save data in cells into file name? The vba below works for one cell, but I need info from cell “E11” also with the text MARK between them. myFileName = "2009 CROP BALE CUT OUT FORM – INVOICE " & Format(ActiveSheet.Range("F12").Text) & ".xls" The final file name should look like this: 2009 CROP BALE CUT OUT FORM - INVOICE 8D4512 MARK CB34.xls
View Replies!
View Related
Saved File Size Not Reduced To Original
I have an Excell 2003 workbook with 6 worksheets and some VBA programmed macros in it. With a small amount of data the .xls file size is 150k. Then I tested it with a much larger sample of data, which goes into one of the worksheets, resulting size 3MB. Later on I reverted to reading in the original small amount of data but the file size stubbornly sticks to 400k instead of reverting to 150k. The old data is definitely not there anymore - I used this code to clear it:
View Replies!
View Related
Sort Code To Run Anytime The File Is Saved
I need the following sort code to run anytime the file is saved....I can't figure out what to title the sub and where to put it (ie. This workbook or in a module). I am attaching the file for reference. The file will not always be saved using the "save as" option - sometimes it is saved just by clicking the "save" icon
View Replies!
View Related
Last Date Saved Formula
Is there a formula that will get the date & time the workbook was last saved? I am using an earlier posted macro now but would like for the information to be visible constantly in a certain cell. Possible? Macro used: Sub WhenSaved() MsgBox "This file was last saved on " & Format(ThisWorkbook.BuiltinDocumentProperties("Last Save Time"), "mmmm d, yyyy") & ".", 64, "Date of most recent save:" End Sub
View Replies!
View Related
Last Date Saved Code
does anyone have a simnple code that when entered in a cell only returns the last date the file was saved? better yet, could it somehow be specific based on a modification to a specific worksheet modified? example: i have 8 worksheets. how can i show when one worksheet is updated, say November 27th 2006, and another worksheet on November 28th 2006?
View Replies!
View Related
Determine Last Saved Date Of Workbook
I am looking for a macro that will run on worksheet activation. it needs to run only if the file had been saved from the previous week. would something like this work? Private Sub Worksheet_Activate() If application.worksheet.lastsaved = msolastweek Then range("RANGE").clearcontents End If End Sub
View Replies!
View Related
Last Saved By Time & Date In Cell
I'm looking for a way show the username of the person who last saved the spreadsheet, and the date & time it was saved. I would like to be able to ouput this data in certain cells on the worksheet. I have tried using something like:
View Replies!
View Related
Send Last Saved Date & Time To Cell
I have a macro that returns the time the sheet was last saved: Function LSDate() LSDate = Application.Caller.Parent.Parent. _ BuiltinDocumentProperties("Last Save Time").Value End Function Unfortuantely, the cell doesn't update without recalculating the cell. Is there a way to get the cell to update automatically every time the sheet is saved?
View Replies!
View Related
How To Use 'Insert Copied Cells' Function In VB
I've been trying to solve this for days. In Excel 2007 there is a 'Insert copied cells' function after copying cells and right-clicking on a cell which basically just inserts all copied cells to your desired location. My question is, how do you call this function in VB, I've used F1 extensively and searched the net and haven't come up with an answer.
View Replies!
View Related
Adding 'select All' Option To Userform Listbox
I have a userform with 5 listboxes on the first page, each with multiple options. They are all set up so any number of options can be chosen. 2 are populated by the 'add item' method, and the other 3 pull data from 3 columns of the database when it's initialised to ensure all possible options are included. My question is this - as there may be many options in each listbox to scroll through, if someone wanted to search on all the options in the listbox, it would be easier to have a 'Select All' option at the top, but I have no idea if this is possible, let alone how to do this -
View Replies!
View Related
When I Hit "/ " Key It's Highlighting The 'File' Menu
I've no idea what combination of keys I hit to do this, but when I hit the / key it's highlighting the 'File' menu - working as though I pressed Alt. Unlike Alt though, it doesn't un-highlight it if I press / again. It only does it in Excel - Word works fine, as does notepad and obviously I can enter it on here to. I've tried rebooting, but it's still there.
View Replies!
View Related
File Is Saved With A ";" As Divider (Danish)
when saving a spreadsheet in csv-format from the user interface of Excel (a Danish version), the file is saved with a ";" as divider (Danish), which is what I want, but when the saving is executed in code like the code below, the file is saved with a "," as divider (USEnglish). When the file then is opened in Excel, each row of data are placed in one cell instead of multiple cells.
View Replies!
View Related
Vb Yes No Error: Click 'Yes' Button It Closes The File Without Saving?
This code appears to do opposite of what I intended i.e., when I click 'Yes' button it closes the file without saving; and when I click 'No' button it closes the file with saving? Private Sub btnExitNewPipes_Click() If MsgBox("Save the Data?", vbYesNo + vbQuestion, "File Save") = vbYes _ Then ActiveWorkbook.Close SaveChanges = True ActiveWorkbook.Close SaveChanges = False End Sub
View Replies!
View Related
Run-time Error '1004':File Not Found :: Folder On Network
The script below scans through a specified folder on a network and scans every xls file inside that folder for a value. When it finds the spreadsheet which contains that value (a policy number) it outputs some of the data from the matching file and also provides a link to the sheet in question. It worked perfectly until I saved, exited and re-opened the file and now I am getting a 1004 run-time error every time I try and execute the script. I cant for the life of me work out a cause. More baffling, the wording of the error says that the file 'R:DirCancellations.xls' could not be found. At no point is a file called 'Cancellations.xls' specified. Why has the script decided to search for a file called 'Cancellations'? Sub Search() ActiveSheet.unprotect ActiveWorkbook.unprotect Dim wb As Workbook Dim TheFile As String Dim MyPath As String Dim DirLoc As String Dim PolNum As String ActiveSheet.Range("C13:G25").ClearContents................
View Replies!
View Related
File Locked For Editing By 'User Name' On Save
i have this code to run autofilter in protected sheet2, assigned to a check Box, but it gives me this Msg when i run the code by checking the check Box: File in use. The file is locked for editing by the (my name). However, when i excute the code by F5 in the VBE window, it works fine also when i excute the code from Worksheet_Activate , it works fine Sub t() With Sheet2 . Protect "0", , , , userinterfaceonly:=True, Allowautofilter:=True .AutoFilterMode = False .Range("A5:DT5").AutoFilter End With End Sub
View Replies!
View Related
'Background' Insertion File Size/limiting?
I'd like to insert a picture background for multiple s/ sheets I've developed, however, even though the images I'm using are only 30kb's in size, it bumps my s/sheet file size from 900kb's to over 4mb's ! Is there a way I can stop this from happening, or, any way to restrict the background image to only a certain part of the worksheet as opposed to the entire thing?
View Replies!
View Related
Runtime Error '53' File Not Found
I wrote a program in Excel that calls a form to load when an action happens on a spreadsheet page, the code I used to call the form from is sqe_portal.UserForm_Initialize however since upgrading to MSoffice 2003 i get the runtime error '53' file not found. the files still their...? any ideas?
View Replies!
View Related
Macro In .xlt File Won't Work In .xls File
Using Office 2000, here is the code I am using which works on my laptop with Office 2007. This file is initially saved as a template (.xlt) file. This code works if I right-click and open the template and enter data, but when I just double click and open, causing it to open as an .xls file, it doesn't work. (The textboxes are inserted textboxes not from a userform). VBA: Option Explicit Sub Text_Copy() With Worksheets("Description") Worksheets("Summary").Shapes("TextBox3").TextFrame.Characters.Text = .Shapes("TextBox1").TextFrame.Characters.Text & " " & .Shapes("TextBox2").TextFrame.Characters.Text End With End Sub
View Replies!
View Related
Change Name Of 'File In Use By' Message
My co-workers and I have excel files on a drive. When one of us is in the file, and it opens read only we just see the name of our company. How can we change it to be able to see each other's names? Its the "file in use" message that pops up. It states the name of the file and by: X when we open the file.
View Replies!
View Related
|