Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro works fine in xl2002 but does not in xl 2000
Hi!
The following code work fine in xl2002 but wont work in xl2000. I have 2 buttons that run the following code, could someone take a loo and tell me why it does not work. Thanks for your help, Nolin Private Sub btnHide_Click() On Error Resume Next Application.ActiveWorkbook.Unprotect Application.ActiveSheet.Unprotect Application.ScreenUpdating = False Worksheets("Purchase").ScrollArea = ("a1:i60") Worksheets("Purchase").Range("f24:i29").Cut Worksheets("Purchase").Paste Destination:=Worksheet _("Purchase").Range("f54:i59") Worksheets("Purchase").Range("f24:i29").Select Selection.Interior.Color = RGB(223, 223, 232) Worksheets("Purchase").Range("d10").Select Worksheets("Purchase").btnHide.Visible = False Worksheets("Purchase").btnShow.Visible = True Worksheets("Purchase").Image4.Visible = True Worksheets("Purchase").ScrollArea = ("a1:i29") Application.ScreenUpdating = True Application.ActiveSheet.Protect Application.ActiveWorkbook.Protect End Sub Private Sub btnShow_Click() Application.ActiveWorkbook.Unprotect Application.ActiveSheet.Unprotect Application.ScreenUpdating = False Worksheets("Purchase").ScrollArea = ("a1:i60") Worksheets("Purchase").Range("f54:i59").Cut Worksheets("Purchase").Paste Destination:=Worksheet _("Purchase").Range("f24:i29") Worksheets("Purchase").Range("g25").Select Worksheets("Purchase").btnShow.Visible = False Worksheets("Purchase").btnHide.Visible = True Worksheets("Purchase").Image4.Visible = False Worksheets("Purchase").ScrollArea = ("a1:i29") Application.ScreenUpdating = True Application.ActiveSheet.Protect Application.ActiveWorkbook.Protect End Su -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro works fine in xl2002 but does not in xl 2000
Nolin,
I too am having trouble getting code written in XL 2002 to work whe run on XL 2000. One issue I noticed, however, is that if the user o XL2000 has kept their XL updated with service packs, then the macro work. I don't know what service pack fixs the problem though. Another suggestion: Trap the line in your code that is causing th hangup and post the error on these pages. I do this by inserting: msgbox ("A") 1st line of code msgbox("B") 2ndline of text etc. When the macro runs on XL2000 you can find which line causes th problem I have another post out there where I ask the similar question and I a asking for some feedback. Use search option on this forum fo username: "jasonsweeney" and see my related post -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
xls file works fine in Excel 2000 and 2007 but crashes on opening in 2003 | Excel Discussion (Misc queries) | |||
Pivot table is not valid in Excel 2000 but works fine in EXCEL 200 | Excel Discussion (Misc queries) | |||
Macro fine Run fine from Select but not from KB Shortcut? | Excel Discussion (Misc queries) | |||
Macro hangs up often but sometimes works fine | Excel Worksheet Functions | |||
VLOOKUP on separate file: Works fine for a while.... | Excel Worksheet Functions |