PC Review


Reply
Thread Tools Rate Thread

HOW TO CHECK FILE IS SAVED

 
 
K
Guest
Posts: n/a
 
      11th Jun 2008

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 With Quote
 
 
 
 
Corey ....
Guest
Posts: n/a
 
      12th Jun 2008
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" <(E-Mail Removed)> wrote in message
news:93ed8769-c910-4475-92f3-(E-Mail Removed)...
>
> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Check Worksheet When Workbook Is Saved =?Utf-8?B?Q2xhcmU=?= Microsoft Excel Programming 2 15th Oct 2007 09:12 PM
How do I get my saved GIF file to work.(saved off of powerpoint) =?Utf-8?B?TGlsIE1pa2U=?= Microsoft Powerpoint 6 7th May 2007 03:52 PM
Check for duplicate before new record saved =?Utf-8?B?TG9uZ1dheUZyb21Ib21l?= Microsoft Access Form Coding 4 7th Aug 2006 08:03 PM
check to see if record saved =?Utf-8?B?Qi4gTWVpbmNrZQ==?= Microsoft Access Form Coding 2 13th Oct 2005 07:11 PM
Check to see if excel file has been saved =?Utf-8?B?RXhjZWxNb25rZXk=?= Microsoft Excel Programming 2 16th Jul 2005 03:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:25 AM.