Results 1 to 5 of 5

Macro doesn't work with another workbook acitive

Threaded View

  1. #1
    Registered User
    Join Date
    02-18-2012
    Location
    Bel Air, MD
    MS-Off Ver
    Excel 2010
    Posts
    13

    Macro doesn't work with another workbook acitive

    The macro below runs fine until another workbook is the active workbook. What can I do to change this macro to make it work while I have another workbook open and active. The macro works fine as long as the workbook to which it belongs is the active workbook. It will halt on the line beginning with Set rnAR_Dest with an Error 9 Subscript out of range.


    Private Sub ActivateRange()
    
        stAR_ConfigSheetName = "arConfig_" & Me.Name
        Set rnAR_Dest = Me.Range(Worksheets(stAR_ConfigSheetName).[ar_range].Value)
        Set rnAR_Table = rnAR_Dest.Resize(1, 1).Offset(1, 1)
        Worksheets(stAR_ConfigSheetName).[ar_YFAttributes] = GetCurrentYahooFinancialAttributeTags
        
    End Sub
    Last edited by kioolt; 04-24-2014 at 12:07 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro work in personal workbook, doesn't work in other workbooks
    By Centexcel in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-30-2013, 11:47 AM
  2. macro to copy cells to a new workbook doesn't work properly
    By dileva in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-12-2013, 10:55 AM
  3. [SOLVED] Event macro runs in wrong workbook/doesn't work properly
    By VBA FTW in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-30-2012, 11:28 AM
  4. [SOLVED] Macro doesn't work when workbook is renamed
    By tandi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-23-2012, 01:13 PM
  5. Macro that should create csvs of all the sheets of a workbook doesn't work! help!
    By scantron in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-15-2012, 12:46 PM

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