Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.links
 
Posts: n/a
Default Simplifying my Previous Request for Assistance

I suspect that (since I didn't get any response on my previous request for
assistance) I may need to approach this in stages ...

Assuming that Information Rights Management (IRM) won't give me the detailed
permissions I need, basically, here's what I need:

1. A Macro that will unprotect a series of Workbooks (approximately 200 of
them) so that the Auto Update function in Linked Data can update without
user intervention.

2. I copied this Macro from a previous post -- how can I modify the
following code to achieve what I need from it:

Can I use something like this?
I assume that I'll need something like this to unprotect the affected
worksheets:
ActiveSheet.Unprotect Password:="" '<===I assume that I'll enter
my worksheet password between the ""

Private Sub Workbook_Open()
Dim vLinkSources
Dim iLinkSource As Integer
vLinkSources = ThisWorkbook.LinkSources(xlExcelLinks)
If Not IsEmpty(vLinkSources) Then
For iLinkSource = LBound(vLinkSources) To UBound(vLinkSources)
ThisWorkbook.UpdateLink vLinkSources(iLinkSource), xlExcelLinks
Next
End If
End Sub

I'll need to re-protect the affected worksheets upon closing:
ActiveSheet.Protect Password:="" '<===I assume that I'll enter my
worksheet password between the ""
End Sub

Any help in setting me straight on this would be greately appreciated --
thanks in advance.


  #2   Report Post  
Posted to microsoft.public.excel.links
 
Posts: n/a
Default I'm almost there ...

Does anyone see anything that I may be missing? Here's the MOST important
thing I need this code to do (assuming there are no further modifications
needed) ...

This code (Macro) needs to perform this same task on approximately 200
different Workbooks (all residing in the same Network Directory), but ONLY
when a Command Button is pressed. I'm assuming that I'll need to create a
Form (in ACCESS perhaps) and call this Macro -- correct? How would I do
this, and how would I get this Macro to perform this Link Update on all 200
or so Workbooks?

Private Sub Workbook_Open()
Dim vLinkSources
Dim iLinkSource As Integer
Dim AnySheet As Worksheet
For Each AnySheet In ActiveWorkbook.Worksheets
ActiveWorkbook.Worksheets(AnySheet.Name).Unprotect
Password:="mypassword"
Next
vLinkSources = ActiveWorkbook.LinkSources(xlExcelLinks)
If Not IsEmpty(vLinkSources) Then
For iLinkSource = LBound(vLinkSources) To
UBound(vLinkSources)
ActiveWorkbook.UpdateLink vLinkSources(iLinkSource), xlExcelLinks
Next
End If
For Each AnySheet In ActiveWorkbook.Worksheets
ActiveWorkbook.Worksheets(AnySheet.Name).Protect
Password:="mypassword"
Next
End Sub
=========================================

wrote in message
...
I suspect that (since I didn't get any response on my previous request for
assistance) I may need to approach this in stages ...

Assuming that Information Rights Management (IRM) won't give me the
detailed permissions I need, basically, here's what I need:

1. A Macro that will unprotect a series of Workbooks (approximately 200
of them) so that the Auto Update function in Linked Data can update
without user intervention.

2. I copied this Macro from a previous post -- how can I modify the
following code to achieve what I need from it:

Can I use something like this?
I assume that I'll need something like this to unprotect the affected
worksheets:
ActiveSheet.Unprotect Password:="" '<===I assume that I'll
enter my worksheet password between the ""

Private Sub Workbook_Open()
Dim vLinkSources
Dim iLinkSource As Integer
vLinkSources = ThisWorkbook.LinkSources(xlExcelLinks)
If Not IsEmpty(vLinkSources) Then
For iLinkSource = LBound(vLinkSources) To UBound(vLinkSources)
ThisWorkbook.UpdateLink vLinkSources(iLinkSource), xlExcelLinks
Next
End If
End Sub

I'll need to re-protect the affected worksheets upon closing:
ActiveSheet.Protect Password:="" '<===I assume that I'll enter my
worksheet password between the ""
End Sub

Any help in setting me straight on this would be greately appreciated --
thanks in advance.



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
Simplifying my previous Request for Assistance Excel Worksheet Functions 1 July 6th 06 02:06 PM
Simplifying my previous Request for Assistance Excel Discussion (Misc queries) 2 July 6th 06 02:01 PM
Sum of previous offset number of cells not to exceed certain value SimonK Excel Worksheet Functions 0 February 16th 06 02:41 PM
Match Last Occurrence of two numbers and Count to Previous Occurence Sam via OfficeKB.com Excel Worksheet Functions 33 April 4th 05 02:17 PM
How to Create an Excel Macro to send a meeting request. DM HD Excel Discussion (Misc queries) 2 February 28th 05 02:39 PM


All times are GMT +1. The time now is 12:26 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"