+ Reply to Thread
Results 1 to 4 of 4

Using indirect

Hybrid View

Pickygame Using indirect 12-14-2010, 07:46 AM
TMS Re: Using indirect 12-14-2010, 07:57 AM
Marcol Re: Using indirect 12-14-2010, 07:59 AM
Pickygame Re: Using indirect 12-14-2010, 01:56 PM
  1. #1
    Registered User
    Join Date
    04-03-2009
    Location
    yorkshire
    MS-Off Ver
    Office 365
    Posts
    89

    Using indirect

    I am using indirect to select a sourcefile containing data and use this set of event subs in to open the dependent file when the workbook is opened, and to close the dependent file when the workbook is closed.



    Private Sub Workbook_BeforeClose(Cancel As Boolean)
        Application.Windows(" Anonymised Data.xlsx").Activate
        ActiveWindow.Close
    End Sub
    
    Private Sub Workbook_Open()
        Workbooks.Open Filename:= _
            "D:\ Anonymised Data.xlsx"
        Application.Windows("TSCF_Loan_Application_2010_ver1.xlsm").Activate
    End Sub
    My problem is that the original file (TSCF_Loan_Application_2010_ver1.xlsm) is a read only file. When it is used we save the file with another file name such as 1234 abc.xlsm. This is then available for future reference and is easily identified. However when it is reopened excel looks for TSCF_Loan_Application_2010_ver1.xlsm and not the newly named file.

    How can i solve this?

    Thanks

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,201

    Re: Using indirect

    You could set a flag somewhere in the "master" workbook to indicate that the file has been saved and anonymised.

    When you open the master workbook, check the flag; if it is not set, look for the Read Only file; if it is, look for the anonymised file.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Using indirect

    It might be useful to give an example of your INDIRECT formula.

  4. #4
    Registered User
    Join Date
    04-03-2009
    Location
    yorkshire
    MS-Off Ver
    Office 365
    Posts
    89

    Re: Using indirect

    I have supplied the two workbooks.

    The Conaccess Anonymised Data file is the Source File.

    The TSCF Loan Application Ver1 has 3 sheets. A data files sheet that i use to select the location of the source file used for the Indirect function, an intro sheet that users populate first. This is where the main Indirect formuals are and an Initial inquiry sheet that is used for completing the form. I have stripped out the rest of the worksheets

    Thanks

+ 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