Thread: Saving file
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Paul Paul is offline
external usenet poster
 
Posts: 661
Default Saving file

I think that will work, if the path is C is will use Save and if it is
something else I will use SaveAs. Only one user has access to each workbook.

Thanks!

Paul

--
Paul


"irishboyx" wrote:


this should work enter it into the thisworkbook module

Code:
--------------------

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

If Left(ThisWorkBook.Path, 1) = "c" Then ' so if it is on there drive
MsgBox "hello" ' enter you code here
End If

'it will still save as they clicked save

End Sub

--------------------


this will do as you asked, although it will not overcome your problem
if more than one person is entering info into each workbook, and it
isnt shared

person (A) opens the workbook and saves it to their own hard drive
person (B) opens the workbook and save it to their own hard drive
person (A) saves his workbook back on to the network
person (B) saves his workbook back on to the network (overwriting
person (A)'s info)

(not sure if that is the case, if it is)

How many people are using the workbook?
How often is it used?
How large is the workbook?
Do the users need to see each others information?


--
irishboyx
------------------------------------------------------------------------
irishboyx's Profile: http://www.excelforum.com/member.php...o&userid=32498
View this thread: http://www.excelforum.com/showthread...hreadid=522893