Hi,
I was previously working in Excel 2000 and have upgraded to Excel 2007 only a couple of months ago.
Background to problem:
I have a workbook with 3 different sheets. I only want 1 of the sheets to be "Activated" at a particular time. So, for the sheet that I want to de-activate, I create a rectangle and place it over the sheet. This way the user cannot use any of the fields in the de-activated sheets.
I am updating the entire file and have copied the sub from the old file to the new one. This is the code I am copying..
Sheets("Price").Select
ActiveSheet.Shapes("Rectangle 16").Select
Selection.ShapeRange.Height = 561.75
Selection.ShapeRange.Width = 801
It works fine in the old file, but when I run it in the new file, I get an error:
The item with the specified name wasn't found.
It is the ActiveSheet.Shapes("Rectangle 16").Select line that is causing the problem.
I inherited this macro, so if anyone can point me in the right direction to get this working, I would be very grateful.
If you require any other information, please let me know.
Regards,
Eoin
I was previously working in Excel 2000 and have upgraded to Excel 2007 only a couple of months ago.
Background to problem:
I have a workbook with 3 different sheets. I only want 1 of the sheets to be "Activated" at a particular time. So, for the sheet that I want to de-activate, I create a rectangle and place it over the sheet. This way the user cannot use any of the fields in the de-activated sheets.
I am updating the entire file and have copied the sub from the old file to the new one. This is the code I am copying..
Sheets("Price").Select
ActiveSheet.Shapes("Rectangle 16").Select
Selection.ShapeRange.Height = 561.75
Selection.ShapeRange.Width = 801
It works fine in the old file, but when I run it in the new file, I get an error:
The item with the specified name wasn't found.
It is the ActiveSheet.Shapes("Rectangle 16").Select line that is causing the problem.
I inherited this macro, so if anyone can point me in the right direction to get this working, I would be very grateful.
If you require any other information, please let me know.
Regards,
Eoin