J
Jason
The majority of machines in our company are still running Win2k Pro and
Office 97. However, they are now starting to phase in some new machines
equipped with WinXP Pro and Office 2003. Below is an excerpt of my code that
is encountering an error on the new machines, but not on the old:
Sub Update()
'
' Copies the data from the Production sheet, and is used in conjunction
' with one of the two macros below (AudProd or FieldAuditTrackingUpdate).
'
Application.ScreenUpdating = False
Application.Run "ProdLog"
Application.ScreenUpdating = False
Sheets("Production").Range("A1").Select
Sheets("Production").Copy Before:=Sheets("Reports")
Sheets("Production (2)").Select
Sheets("Production (2)").Unprotect Password:="xxxxxx"
ActiveSheet.Shapes("CommandButton1").Delete
ActiveSheet.Shapes("CommandButton2").Delete
ActiveSheet.Shapes(2).Select
With Selection
.Font.ColorIndex = 6
.ShapeRange.Fill.Visible = msoTrue
.ShapeRange.Fill.Solid
.ShapeRange.Fill.ForeColor.RGB = RGB(0, 0, 204)
.OnAction = "MainMenu"
End With
Range("F4").Select
Range("A1:B1").MergeCells = False
Range("D1:E1").MergeCells = False
Range("A1").ClearContents
Range("D1").ClearContents
Range("A1:BD300").Select
Selection.Copy
With Selection
.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False,
Transpose:=False
.Locked = True
.FormulaHidden = True
End With
Range("A4:BD300").Select
With Selection
.Font.FontStyle = "Regular"
.Font.ColorIndex = xlAutomatic
.Interior.ColorIndex = xlNone
End With
Application.CutCopyMode = False
Range("A1:BD3").Font.ColorIndex = xlAutomatic
End Sub
Does anyone see anything above that would result in this error for WinXP Pro
and Excel 2003?
The error is: "The item with the specified name wasn't found."
The sheet has 4 autoshapes (2 command buttons and 2 other shapes).
I would really appreciate any insight.
Oh, and please don't knock the code too badly, I am a beginner at this and
self-taught.
Office 97. However, they are now starting to phase in some new machines
equipped with WinXP Pro and Office 2003. Below is an excerpt of my code that
is encountering an error on the new machines, but not on the old:
Sub Update()
'
' Copies the data from the Production sheet, and is used in conjunction
' with one of the two macros below (AudProd or FieldAuditTrackingUpdate).
'
Application.ScreenUpdating = False
Application.Run "ProdLog"
Application.ScreenUpdating = False
Sheets("Production").Range("A1").Select
Sheets("Production").Copy Before:=Sheets("Reports")
Sheets("Production (2)").Select
Sheets("Production (2)").Unprotect Password:="xxxxxx"
ActiveSheet.Shapes("CommandButton1").Delete
ActiveSheet.Shapes("CommandButton2").Delete
ActiveSheet.Shapes(2).Select
With Selection
.Font.ColorIndex = 6
.ShapeRange.Fill.Visible = msoTrue
.ShapeRange.Fill.Solid
.ShapeRange.Fill.ForeColor.RGB = RGB(0, 0, 204)
.OnAction = "MainMenu"
End With
Range("F4").Select
Range("A1:B1").MergeCells = False
Range("D1:E1").MergeCells = False
Range("A1").ClearContents
Range("D1").ClearContents
Range("A1:BD300").Select
Selection.Copy
With Selection
.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False,
Transpose:=False
.Locked = True
.FormulaHidden = True
End With
Range("A4:BD300").Select
With Selection
.Font.FontStyle = "Regular"
.Font.ColorIndex = xlAutomatic
.Interior.ColorIndex = xlNone
End With
Application.CutCopyMode = False
Range("A1:BD3").Font.ColorIndex = xlAutomatic
End Sub
Does anyone see anything above that would result in this error for WinXP Pro
and Excel 2003?
The error is: "The item with the specified name wasn't found."
The sheet has 4 autoshapes (2 command buttons and 2 other shapes).
I would really appreciate any insight.
Oh, and please don't knock the code too badly, I am a beginner at this and
self-taught.