Excel Macros working in one version of Excel 2000 and not another from Mr Excel
With Macromedia Shockwave Player, you can enjoy multimedia games, learning applications, and product demonstrations on the Web, using exciting new 3D technology. Get it at: http://www.macromedia.com/shockwave/download



 FAQFAQ
   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   StatisticsStatistics 
 RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Online StoreOnline Store

MrExcel Message Board Forum Index -> Excel Questions

Macros working in one version of Excel 2000 and not another
Post new topic   Reply to topic
Last Thread | Next Thread  >   Printable version
  Author    Thread

rkmusselman
Board Regular


Joined: 30 Oct 2003
Posts: 20

Flag: Blank

Status: Offline

 Reply with quote  

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
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

Post Thu Apr 08, 2004 8:13 pm 
 View user's profile Send private message Send e-mail

Joe Was
MrExcel MVP


Joined: 20 Feb 2002
Posts: 1171
Location: Central Florida, USA
Flag: Usa

Status: Offline

 Reply with quote  

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!"

Post Thu Apr 08, 2004 10:03 pm 
 View user's profile Send private message Send e-mail
  Display posts from previous:      

MrExcel Message Board Forum Index -> Excel Questions


Forum Jump:
Jump to:  

Post new topic   Reply to topic
Page 1 of 1



Add To Favorites

 


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB: 2.0.4 © 2001 phpBB Group

Need help posting your first question? Read how to post

Need extra help ? Couldn't get the answer you needed ? Get a free quote from our Consulting Team

Download Colo's HTML Maker utility for displaying your Excel Worksheet on the board.

Download VB HTML Maker to post your code on the board


Check out our new index to 485 Excel Articles.


Return to MrExcel Consulting

All contents Copyright 1998-2004 by MrExcel.com
If you believe information posted here is from your copyrighted source, notify us per the Terms of Use
Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.