Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Links / September 2003

Tip: Looking for answers? Try searching our database.

Update timeframe for linked data.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
J Marro - 15 Sep 2003 03:07 GMT
This istaken from another thread I started.. . . .it was recommended to use
an OnTime updater to solve this problem. Any other siggestions?

  So here is the alternate route I was trying: same workbook as before but
I created a single sheet workbook that linked to the original workbook page
I was needing Protected. The single sheet can stay Protected and one person
can update the main workbook to which the single sheet links. It seemed like
a good idea and "looked good on paper" but the execution is lacking. I
somewhat understand why the following happens but I don't completely
understand and need a solution.

  First a little background on the idea behind the workbook: I have a team
in different offices around a building. I keep track of cars driving around
the building and want to let everyone on my team know what each make, model,
color and license plate is for all the cars I see. I want them to keep an
eye out for the same cars so I need to update them quickly on what I see. So
I have a source workbook I will update throughout the day. It will be easier
for them if all the makes are together in the sheet. When I enter each car's
specs I alpha sort the sheet by make. Each team member has access to the
linked single sheet but not the source workbook. Throughout the day they
leave the linked sheet open on their computer so they can quickly get the
latest info but I want it Protected so they don't edit the car info.

 OK, there's the idea. The execution is this: The files are set to update
automatically. I have the source workbook and the linked sheet in the same
folder on a shared network drive. I have both open on my computer. I update
the latest car info, sort and view the linked single sheet - the latest car
is there in the correct alpha order. I go to my co-workers computer and open
the linked sheet for the first time. The latest car is there but not
sorted - it is at the bottom of the list where it is placed after I
initially enter the car. If I leave the their sheet open when I update the
next car it does not appear on the sheet, at least not for some great length
of time which I have yet to determine. I have found a lot of info saying
this can happen with large files with lots of cells to update and
particularly with lookup references. The spreadsheet is 250 cells long by 6
wide with no lookup references.

  So, 1) Why does the car stay at the bottom of the list even though the
source list is sorted and 2) What can be done to make the update quick. And,
3) Knowing what I am trying to do is there a better solution whether with
Excel or Access? This is all on a company network so there is no option to
install additional applications.

  I hope everyone is still awake who started reading this thinking they
could help. Thanks in advance
Bill Manville - 15 Sep 2003 09:18 GMT
On other peoples' computers the links are to the copy of your master
worksheet as saved on disc, not to the sheet as you see it on your
screen.

To get other people to see the latest version you will need to save
your sheet and they will need to explicitly update their sheet using
Edit / Links / Update Link.

You could set up the "viewers" to periodically update their links using
an OnTime macro.

But Excel is really not a multi-user application.

If you stored the information in an Access table you could do better,
but the viewers would again need to requery the table at regular
intervals (e.g. using a Timer event on the form) to see new records as
they were added.  The sorting could be done by the query on which the
form is based so you would not need to re-order the records in the
table.

An alternative would be to have the viewers set as an Excel sheet which
has a query to the master table (whether in an Excel file on disc or an
Access table), to retrieve the latest information.  In Excel 2000 or
later the query could be set to run automatically at regular intervals.
In Excel 97 you would need to run an OnTime macro to do the update.

You would set it up via Data / Get External Data / New Database Query
(or similar - wording depends on Excel version).  Again, the sorting
can be done by the query so you don't need to keep the original table
sorted.

Hope something in there helps!

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup
J Marro - 16 Sep 2003 05:30 GMT
It appears that Edit>Links>Update Now cannot be executed on a Protected
sheet? When the sheet is Protected Update Now is greyed out. An OnTime macro
cannot be executed on a Protected sheet - I get an error saying as much.

If I do not intend for users are to modify the single sheet file, is there
any reason I cannot run a macro that would Un-share the file, Unprotect the
file, Run Edit>Links>Update Now, reprotect the file and re-share? That would
give the latest updated data to each user. The impact of un-sharing a file
seems to be the saving of user data (according to the pop-up warnings)but
they are not updating anything anyway.

If multiple users have the same file open at the same time are they
adversely affected by un-sharing the file?

> On other peoples' computers the links are to the copy of your master
> worksheet as saved on disc, not to the sheet as you see it on your
[quoted text clipped - 32 lines]
> MVP - Microsoft Excel, Oxford, England
> No email replies please - respond to newsgroup
Bill Manville - 16 Sep 2003 08:02 GMT
> It appears that Edit>Links>Update Now cannot be executed on a Protected
> sheet? When the sheet is Protected Update Now is greyed out.

Correct.
So you run a macro:

Sub UpdateMe()
ActiveSheet.Protect UserInterfaceOnly:=True
ActiveWorkbook.UpdateLink ActiveWorkbook.LinkSources(xlExcelLinks)(1)
End Sub

> An OnTime macro
> cannot be executed on a Protected sheet - I get an error saying as much.

The above can be executed as an OnTime macro.

Dim NextTime As Date

Sub Auto_Open()
NextTime = Now+TimeValue("00:01:00")
Application.OnTime NextTime, "UpdateMe"
End Sub

Sub Auto_Close()
Application.OnTime NextTime, "UpdateMe", schedule:=False
End Sub

Sub UpdateMe()
ActiveSheet.Protect UserInterfaceOnly:=True
ActiveWorkbook.UpdateLink ActiveWorkbook.LinkSources(xlExcelLinks)(1)
NextTime = Now+TimeValue("00:01:00")
Application.OnTime NextTime, "UpdateMe"
End Sub


> is there
> any reason I cannot run a macro that would Un-share the file, Unprotect the
> file, Run Edit>Links>Update Now, reprotect the file and re-share?

I didn't think that the viewer file was a shared workbook.
It doesn't need to be, and there is no value in it being so.  Just make it a
read-only workbook of which each user opens a copy.
You can't unshare a workbook if other users have it open, can you?

I do not encourage the use of shared workbooks.

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup
J Marro - 17 Sep 2003 07:20 GMT
> > It appears that Edit>Links>Update Now cannot be executed on a Protected
> > sheet? When the sheet is Protected Update Now is greyed out.
[quoted text clipped - 44 lines]
> MVP - Microsoft Excel, Oxford, England
> No email replies please - respond to newsgroup

I think I about have this thing beat.

You can unshare a workbook while it is open - there are just a couple of
warnings about the impact on other users.

I don't know why I was thinking it needed to be shared - I guess because
that is the original route I was going and got it stuck in my head.

Is the Auto_Close setting necessary in Excel 97? I recall reading that 97
resets on close and does not need such routines to put settings back to
default. Plus I get an error message with that Sub in the workbook. I can't
recall the exact message but I'll note it tomorrow when I get back to work.
Bill Manville - 17 Sep 2003 10:55 GMT
> Is the Auto_Close setting necessary in Excel 97?

Yes.

If you don't cancel the outstanding OnTime and you close the workbook but
don't close Excel, the workbook will be re-opened within the next minute to
run the macro!

> I recall reading that 97
> resets on close and does not need such routines to put settings back to
> default.

That may be true for some settings - but not for most.

> Plus I get an error message with that Sub in the workbook. I can't
> recall the exact message but I'll note it tomorrow when I get back to work.

If you copied and pasted the code there should be no message (it works OK for
me).  Only thing might be if you already had an Auto_Close procedure.  In
that case, combine the two.

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.