![]() |
HOW TO CHECK FILE IS SAVED
Hi all, i got excel file which myself and other work colleagues use for work purpose and that file is read only as we have to save it as, "save as" so no body can save changes in orginal file. i am looking for macro that which sould check that file has been "saved as" and if the orginal file is not "saved as" then it should give message that "SAVE FILE FIRST" and then exit from macro and once that file is been saved then macro should email that file path or hyberlink to other person. I did tried looking in Ron debruin website for my answer but i wasnt successful although Ron has very good stuff in his website. Please if any friend can help. Please note that when file will be save by other colleague they can give any name to it so macro should give name of Activeworkbook.name when sending hyberlink by email. |
HOW TO CHECK FILE IS SAVED
You could place a value in an unused cell in a sheet to determine IF the
Sheet has been saved, then use something like : Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) With Sheet1 If Range("A30").Value < "" Then MsgBox "The WorkBook has Already Been Saved !", vbInformation Exit Sub End If If Range("A30").Value = "" Then Range("A30").Value = "WorkBook Saved" End If End With End Sub Just modify the A30 and Sheet1 to suit. You will still get the SaveAs Dilog Box, but it will PROMPT the user BEFORE that it has been Saved. Corey.... "K" wrote in message ... Hi all, i got excel file which myself and other work colleagues use for work purpose and that file is read only as we have to save it as, "save as" so no body can save changes in orginal file. i am looking for macro that which sould check that file has been "saved as" and if the orginal file is not "saved as" then it should give message that "SAVE FILE FIRST" and then exit from macro and once that file is been saved then macro should email that file path or hyberlink to other person. I did tried looking in Ron debruin website for my answer but i wasnt successful although Ron has very good stuff in his website. Please if any friend can help. Please note that when file will be save by other colleague they can give any name to it so macro should give name of Activeworkbook.name when sending hyberlink by email. |
All times are GMT +1. The time now is 09:30 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com