Problem working in 2003 and then saving with .mht extension (single file web page). I have a simple "On Open" procedure that is called upon to reshape a listbox.
=================================
=================================
Sub Resize_Objects()
'Resizes Listbox
On Error GoTo ERROR_Resize_Objects
Application.ScreenUpdating = False
ThisWorkbook.Sheets("Sheet1").Select
ThisWorkbook.ActiveSheet.Shapes("ListBox3").Select
With Selection.ShapeRange
.Height = 98
.Width = 152.25
End With
=================================
When workbook is opened as a .xls, the code works. When the file is opened as a .mht, it returns an error that tells me that "The item with the specified name wasn't found." (runtime error '-2147024809 (80070057))........BUT, if I stop the code and intiate manually, it runs fine.
Also the debug yellow line stops at the line "ThisWorkbook.ActiveSheet.Shapes("ListBox3").Select".
Any suggestions here?
'Resizes Listbox
On Error GoTo ERROR_Resize_Objects
Application.ScreenUpdating = False
ThisWorkbook.Sheets("Sheet1").Select
ThisWorkbook.ActiveSheet.Shapes("ListBox3").Select
With Selection.ShapeRange
.Height = 98
.Width = 152.25
End With
=================================
When workbook is opened as a .xls, the code works. When the file is opened as a .mht, it returns an error that tells me that "The item with the specified name wasn't found." (runtime error '-2147024809 (80070057))........BUT, if I stop the code and intiate manually, it runs fine.
Also the debug yellow line stops at the line "ThisWorkbook.ActiveSheet.Shapes("ListBox3").Select".
Any suggestions here?