Help with Macro

S

Steve Klenner

This macro works fine in a workbook that I created in Excel2000. I am
updating it in Excel 2003 and find that it does NOT work in new workbook.
1 - Any help in re-working macro to work in 2003 is appreciated
2 - Why will it work in an old workbook but not in a new?
3 - I've put remarks in to explain what I'm trying to accomplish
Thanks
*************************************************************
Sub MISalesTAX_Totals()
Application.ScreenUpdating = False
'UnProtect Sheets for Updating
For Each sht In Sheets
sht.Unprotect Password:="xxxxx"
Next sht
Sheets(Array("Axxess Common Eq", "Axxess 64 Common Eq", "Circuit Cards",
"Station Eq", "Voice Mail", _
"Taske ACD", "Int CTI Apps", "Interprise", "Peripherals 1", "Oaisys
CTI Apps", _
"Paging", "Racks_PP", "Misc Items", "Peripherals 2", "Unified
Msg")).Select
'Select G57 and F57 in each Sheet and input formulas
Range("G57").Select
ActiveCell.FormulaR1C1 = "=R[-1]C*6%"
Range("F57").Select
ActiveCell.FormulaR1C1 = "MI Sales Tax"
'Reselect same sheets and Protect Them
For Each sht In Sheets
ActiveSheet.Select
sht.Protect Password:="xxxxx"
Next sht
'Return to Quote Totals Sheet
Sheets("Quote Totals").Select
Application.ScreenUpdating = True
End Sub
*******************************************************************
 
T

Tom Ogilvy

What error are you getting. It could be as simple as declaring your
variables (option explict might be set in xl2003).

Sub MISalesTAX_Totals()
Dim sht
Application.ScreenUpdating = False
. . .

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top