Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Number Format on Excel File saved from .html file | Excel Discussion (Misc queries) | |||
Saved *.csv file gives SYLK file type warning upon Excel 2003 open | Excel Discussion (Misc queries) | |||
How to tell number of spaces between values in saved text file fromthe original xls file | Excel Discussion (Misc queries) | |||
Check Worksheet When Workbook Is Saved | Excel Programming | |||
Check to see if excel file has been saved | Excel Programming |