A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Updating data with an ODBC link to ACCESS



 
 
Thread Tools Display Modes
  #1  
Old July 5th, 2006, 05:50 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default Updating data with an ODBC link to ACCESS

Does anyone know the best approach for this?

I have (roughly) 200 EXCEL files that have VLOOKUPs to 5 additional
spreadsheets which have ODBC links to various rate tables in an ACCESS
database. Here's the scenario:

Part 1.

In ACCESS, I have a various Rate Tables where I maintain and update
corresponding rates for various programs. As these rates are changed in
ACCESS, the corresponding EXCEL spreadsheets (having an ODBC link) need to
be opened and the updates allowed to process.

Part 2.

The EXCEL spreadsheets are used by a myriad of users to provide updates -- I
don't want a user to inadvertantly click on "Allow Updates" on the ODBC
linked data (especially if we're in the middle of modifying the Rates in the
ACCESS database).

Currently, the decision has been to protect the 200 EXCEL spreadsheets, and
on the EDIT Links, the Item Update is set to "Automatic". From what I can
tell, under the current setup, I would need a script (Macro, VBA, or Batch
File) that would pass the password for each protected spreadsheet, so that
the Automatice Update of the Linked data could execute.

What is the BEST way to handle this scenario? Here are some thoughts I had:

1. Would Information Rights Management (IRM) be an option? (assuming that
we could unprotect the spreadsheet and assign unique permissions for users)
2. Is there a Macro/VBS/ or Batch File scenario which could allow me to
automatically UNPROTECT the spreadsheet, Open it, Allow the Update to take
place, then close the spreadsheet?

NOTE. I relatively NEW to creating Batch Files, and what I have currently
have won't get me past the password issue, nor close the individual EXCEL
files after they're updated:


I'm drawing straws on which approach to take on this -- any help would be
greatly appreciated -- thanks in advance!


  #2  
Old July 6th, 2006, 02:09 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default Updating data with an ODBC link to ACCESS

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
...
Does anyone know the best approach for this?

I have (roughly) 200 EXCEL files that have VLOOKUPs to 5 additional
spreadsheets which have ODBC links to various rate tables in an ACCESS
database. Here's the scenario:

Part 1.

In ACCESS, I have a various Rate Tables where I maintain and update
corresponding rates for various programs. As these rates are changed in
ACCESS, the corresponding EXCEL spreadsheets (having an ODBC link) need to
be opened and the updates allowed to process.

Part 2.

The EXCEL spreadsheets are used by a myriad of users to provide updates --
I don't want a user to inadvertantly click on "Allow Updates" on the ODBC
linked data (especially if we're in the middle of modifying the Rates in
the ACCESS database).

Currently, the decision has been to protect the 200 EXCEL spreadsheets,
and on the EDIT Links, the Item Update is set to "Automatic". From what I
can tell, under the current setup, I would need a script (Macro, VBA, or
Batch File) that would pass the password for each protected spreadsheet,
so that the Automatice Update of the Linked data could execute.

What is the BEST way to handle this scenario? Here are some thoughts I
had:

1. Would Information Rights Management (IRM) be an option? (assuming that
we could unprotect the spreadsheet and assign unique permissions for
users)
2. Is there a Macro/VBS/ or Batch File scenario which could allow me to
automatically UNPROTECT the spreadsheet, Open it, Allow the Update to take
place, then close the spreadsheet?

NOTE. I relatively NEW to creating Batch Files, and what I have currently
have won't get me past the password issue, nor close the individual EXCEL
files after they're updated:


I'm drawing straws on which approach to take on this -- any help would be
greatly appreciated -- thanks in advance!



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross program data sharing m_jurrens General Discussion 1 December 16th, 2005 06:29 PM
Unable to have multiple queries feeding a single report PZ Straube Setting Up & Running Reports 15 June 15th, 2005 08:16 AM
Access XP Compared to Access 2003 Mardene Leahu New Users 1 October 1st, 2004 05:11 AM
Word 2000/2002 - Proper Mail Merge steps for ODBC? Tony_VBACoder Mailmerge 7 September 2nd, 2004 09:21 PM
Upload Image Jason MacKenzie General Discussion 1 September 1st, 2004 04:38 AM


All times are GMT +1. The time now is 02:13 PM.


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