+ Reply to Thread
Results 1 to 2 of 2

Opening a file automatically to refresh links

Hybrid View

Hillheader Opening a file automatically... 10-30-2008, 05:04 PM
Hillheader Partly Solved... 10-31-2008, 06:41 AM
  1. #1
    Registered User
    Join Date
    01-19-2006
    Posts
    10

    Opening a file automatically to refresh links

    Hi

    I have a series of files (around 40 in total) for individual users to enter data into. All are created from the one template and thus are standard in format.

    The files are them combined into one masterfile where text codes are converted to numeric values and aggregated. The masterfile is password protected to prevent it being altered by users.

    There is conditional formating in the user files, depending on the aggregate values in the masterfile e.g. if total less than 10, Red, More than 10, Green, = 10 Yellow.

    All very basic stuff really and provided as background.

    However, the data from the masterfile cannot be updated unless that file is open and thus conditional formatting of amended cells in the user files is disabled.

    Is there a way of opening the masterfile as Read Only when the user file is opened? I would also like (if possible) to bypass the password prompt to ensure that the masterfile simply opens and sits (as Read Only) in the background without the user even seeing it there. I would then write a macro to close the masterfile first and then close and save the user file.

    I'm sure this is relatively simple but my VB skills are a bit rusty.

    Thanks in advance for any assistance.

    PS sorry I cannot post the files - they are on a flash drive and it has just packed up! Live copies are in the office and not available from home.
    Last edited by Hillheader; 11-08-2008 at 04:43 AM. Reason: Solved

  2. #2
    Registered User
    Join Date
    01-19-2006
    Posts
    10

    Partly Solved...

    I am using the code below to open the two files I need for another file.

    However, after running through the code, both the files I have just opened (User.xls and Glasgow.xls) are closed!!!!

    I think I am going mad, but hopefully there is a simple explaination. I would really appreciate any advice or assistance

    Thanks

    Sub callplan()
    '
    ' callplan Macro
    ' Macro recorded 31/10/2008 by User
    '

    '
    DisplayAlerts = False
    ChDir "G:\Helpline\Daily Call Plan\Test Versions\Adviser Files"
    Workbooks.Open Filename:= _
    "G:\Helpline\Daily Call Plan\Test Versions\Adviser Files\user.xls", _
    UpdateLinks:=3
    ChDir "G:\Helpline\Daily Call Plan\Test Versions\Managers Files"
    Workbooks.Open Filename:= _
    "G:\Helpline\Daily Call Plan\Test Versions\Managers Files\Glasgow.xls", _
    UpdateLinks:=3, ReadOnly:=True
    DisplayAlerts = True
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1