Macros working in one version of Excel 2000 and not another

rkmusselman

New Member
Joined
Oct 30, 2003
Messages
34
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
Sheets("A").Select
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"
Sheets("A").Select
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
Range("A1").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??

Richard
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
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!
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,427
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top