Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Push updates to other workbooks?

I have a master workbook and 5 different workbooks that have links to the
master workbook. I have to password protect my master workbook as it has
salaries and not everyone should be allowed to see those. I would like to
make an update to the master workbook and have the update be "pushed down"
into the other workbooks, can this be done?

I don't want users to open the other workbooks and select update because
they then need to know the password to the master workbook, which would mute
the point of having the master workbook being password protected.

Thanks!!!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default Push updates to other workbooks?

A simple macro like this should work. The macro would reside in the master
and would be run after you've updated the master. The links should update
automatically.

Sub UpdateLinks()
'Update First Workbook
Workbooks.Open Filename:="C:\Sub1.xls"
ActiveWorkbook.Save
ActiveWindow.Close


'Update Last Workbook
Workbooks.Open Filename:="C:\Sub2.xls"
ActiveWorkbook.Save
ActiveWindow.Close
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Push updates to other workbooks?

You could write a "update file" with a macro (VBA) that includes the passord
and path to your master file from which their individual 5 files can copy the
data and paste into their workbooks where the data belongs.
This way you could have your master file centrally located for you to modify
and they can re-use the "update file" to get the updates.



"ChrisP" wrote:

I have a master workbook and 5 different workbooks that have links to the
master workbook. I have to password protect my master workbook as it has
salaries and not everyone should be allowed to see those. I would like to
make an update to the master workbook and have the update be "pushed down"
into the other workbooks, can this be done?

I don't want users to open the other workbooks and select update because
they then need to know the password to the master workbook, which would mute
the point of having the master workbook being password protected.

Thanks!!!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Push updates to other workbooks?

This is wonderful!!! Thanks so much! One other question, how do I write it if
the other workbooks are password protected?

Thanks again!

"Mike H." wrote:

A simple macro like this should work. The macro would reside in the master
and would be run after you've updated the master. The links should update
automatically.

Sub UpdateLinks()
'Update First Workbook
Workbooks.Open Filename:="C:\Sub1.xls"
ActiveWorkbook.Save
ActiveWindow.Close


'Update Last Workbook
Workbooks.Open Filename:="C:\Sub2.xls"
ActiveWorkbook.Save
ActiveWindow.Close
End Sub

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default Push updates to other workbooks?

Assuming the passwords are "Frogs", the code is:

Workbooks.Open Filename:="c:\Sub1.xls", Password:="Frogs",
UpdateLinks:=3, WriteResPassword:="Frogs"





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Push updates to other workbooks?

Great!!! Now my last question, how would I get this code to run when the user
closes the workbook?

Thanks again for all the wonderful answers!!!

"Mike H." wrote:

Assuming the passwords are "Frogs", the code is:

Workbooks.Open Filename:="c:\Sub1.xls", Password:="Frogs",
UpdateLinks:=3, WriteResPassword:="Frogs"



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default Push updates to other workbooks?

Go into the VBA editor and on the tree on the left, click the ThisWorkbook
under the Microsoft Excel Objects and then over to the right select the
"Workbook" pulldown and then select the "BeforeClose" pulldown to the right
of that. There will now be a sub created:
Private Sub Workbook_BeforeClose(Cancel as Boolean).

Place the code there inside the Sub.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best practice for managing updates w/in distrubted workbooks? Mike G - DC Excel Discussion (Misc queries) 2 July 6th 09 09:21 PM
Push updates from one workbook to others? ChrisP Excel Worksheet Functions 1 July 11th 08 05:25 PM
Grouping workbooks to make updates Tia Excel Discussion (Misc queries) 0 June 7th 06 04:14 PM
Push the button chris Excel Programming 1 August 3rd 05 04:07 PM
Which button did I push Daniel Bonallack[_2_] Excel Programming 4 May 20th 04 09:12 PM


All times are GMT +1. The time now is 04:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"