Macros working in one version of Excel 2000 and not another

Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Macros working in one version of Excel 2000 and not another

  1. #1
    New Member
    Join Date
    Oct 2003
    Post Thanks / Like
    0 Post(s)
    0 Thread(s)

    Default Macros working in one version of Excel 2000 and not another

    I have a macro that refreshes graphs in a farly large Workbook. The macro has worked for several years with multiple versions of Windows98 ME 2000 and XP as well as mutiple versions of Excel 97, 2000 & 2002. The code is a follows:

    ' Refresh Macro
    ' Macro recorded 4/5/97
    Private Sub Refresh()
    ActiveWorkbook.Unprotect ("password")
    Application.ScreenUpdating = False
    'Sub UnHideSheets()
    'This macro needs to be placed in the Workbook that has very hidden
    'worksheets and run from there.
    'This should be done to update any hidden sheets and then removed after
    'the sheets are hidden using the macro above.
    Dim c
    For Each c In ThisWorkbook.Sheets
    c.Visible = True
    Next c
    Application.GoTo Reference:="START_COPY"
    ActiveSheet.Unprotect ("password")
    ' Refresh Small Charts on Page
    refresh_charts "Chart 7", "m_cum_st", "m_cum", "Y", "A"
    refresh_charts2 "Chart 6", "chart6_st", "chart6_range", "Y", "CRF"
    refresh_charts2 "Chart 5", "chart5_st", "chart5_range", "Y", "CRF"
    refresh_charts "Chart 4", "m_hrcum_st", "m_hrcum", "Y", "A"
    refresh_charts "Chart 46", "m_visit_st", "m_visit", "Y", "A"
    enroll_charts "Chart 2", "chart2_st", "chart2_range", "Y"
    enroll_charts "Chart 1", "chart1_st", "chart1_range", "Y"
    Investigator_chart "Chart 3", "Invest_chart_st", "Invest_chart_range", "Y"
    ' Refresh Large Charts in Workbook
    refresh_charts "MONT CUM", "m_cum_st", "m_cum", "N", "A"
    refresh_charts2 "CRFCUM", "chart6_st", "chart6_range", "N", "CRF"
    refresh_charts2 "CRF STATUS", "chart5_st", "chart5_range", "N", "CRF"
    refresh_charts "MONHRSCUM", "m_hrcum_st", "m_hrcum", "N", "A"
    refresh_charts "MONITVISIT", "m_visit_st", "m_visit", "N", "A"
    enroll_charts "CUMULATIVE", "chart2_st", "chart2_range", "N"
    enroll_charts "WEEKLY ENROLL", "chart1_st", "chart1_range", "N"
    Investigator_chart "INVAPPROV", "Invest_chart_st", "Invest_chart_range", "N"
    ActiveSheet.Protect ("password")
    Sheets("MONHRSCUM").Visible = x1Hidden
    Sheets("MONt CUM").Visible = x1Hidden
    Sheets("Weekly Enroll").Visible = x1Hidden
    'Sub HideWorkbooksW_M()
    'Hides Sheets A B and CRF in Weekly and Monthly models
    Sheets("CRF").Visible = xlVeryHidden
    Sheets("B").Visible = xlVeryHidden
    Sheets("A").Visible = xlVeryHidden
    ActiveWorkbook.Protect ("password")
    Sheets("Table of Contents").Select

    End Sub

    It works on three of my mchines one with Windows XP, 2000 and ME. All versions of Excel are the same. My version of Excel is Excel 2002 (10,4524.4219) SP-2
    My users version is Excel 2002 (10.5815.4219) It errors in module 2 where this macro resides. Does the difference in Excel versions matter?
    Any Ideas on what could be causing this problem?
    Thanks or any assistance. This one has me stumpted??


  2. #2
    MrExcel MVP Joe Was's Avatar
    Join Date
    Feb 2002
    Central Florida, USA
    Post Thanks / Like
    1 Post(s)
    0 Thread(s)

    Default Re: Macros working in one version of Excel 2000 and not anot

    Check the references on one of the systems that works and set the references on the non-working PC to the same references as the working one.

    In the VBA editor of Excel Click "Tools" then "References" find the missing reference in the unChecked list. Also check the "Checked" list at the top for a Reference entery marked "Missing" and uncheck any flaged as missing!
    JSW: Try and try again: "The way of the Coder!"

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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