Results 1 to 13 of 13

HELP! Import archive sheet - Simple eh?

Threaded View

  1. #1
    Registered User
    Join Date
    03-27-2016
    Location
    Bradford, UK
    MS-Off Ver
    Home and Student 2013
    Posts
    6

    HELP! Import archive sheet - Simple eh?

    Hi Everyone.

    I am very new to this so please be gentle.

    Problem:
    I want to open an archive sheet in a new workbook, and automatically transfer cells from the archive sheet into different cells on a sheet in the new workbook.

    I have this VBA code (which works great) to find an archive sheet and open it in the new workbook:

    Sub getworkbook()
        ' Get workbook...
        Dim ws As Worksheet
        Dim filter As String
        Dim targetWorkbook As Workbook, wb As Workbook
        Dim Ret As Variant
    
        Set targetWorkbook = Application.ActiveWorkbook
    
        ' get the customer workbook
        filter = "Text files (*.xls),*.xls"
        Caption = "Please Select an input file "
        Ret = Application.GetOpenFilename(filter, , Caption)
    
        If Ret = False Then Exit Sub
    
        Set wb = Workbooks.Open(Ret)
    
        wb.Sheets(1).Move After:=targetWorkbook.Sheets(targetWorkbook.Sheets.Count)
    
        ActiveSheet.Name = "ARCHIVE"
    End Sub
    I first thought that if the cells on the sheet in the new workbook were referenced:

    Formula: copy to clipboard
    =ARCHIVE!C7


    the cell would populate with the value of C7 in the archive sheet, but no (sighs).
    Then I tried:

    Formula: copy to clipboard
    =IF(ISERROR(ARCHIVE!C7),"",ARCHIVE!C7)


    but still no joy.

    So to recap;
    First I want to put formulas in cells in a sheet in the new workbook to automatically (and instantaneously) acquire the value from the specified cells in the archive sheet (when the archive sheet is loaded/opened).

    I may be missing something very basic. It seems like it should be easy but I just can't get Excel to do what I would consider to be quite a simple task.

    Any help ASAP would be greatly appreciated.

    Thanks
    Last edited by moonmonkey; 03-28-2016 at 05:06 AM. Reason: To comply with Rule 3 of the Forum rules (see Post #6)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Move row from sheet to archive in a macro
    By mmccra2858 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-22-2016, 09:58 AM
  2. Move a Row to archive sheet - Values Only
    By lyla22 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-26-2015, 07:16 PM
  3. Macro to copy a line to archive sheet and delete from active sheet
    By mmccra2858 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-08-2015, 09:15 PM
  4. Trying to Move an entire Row from one sheet to another Archive sheet.. Also..
    By Gurbo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-15-2014, 10:50 AM
  5. Replies: 1
    Last Post: 11-14-2014, 08:35 PM
  6. [SOLVED] Need a macro to copy dates & data from one sheet to an updating archive sheet
    By pbj in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-07-2013, 06:58 PM
  7. [SOLVED] Moving a row to archive sheet
    By mmccra2858 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2012, 10:43 AM

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