View Full Version : [SOLVED:] URGENT HELP REQ. (RUN-TIME ERROR)
springbrook
06-30-2005, 02:49 AM
URGENT HELP REQ. (RUN-TIME ERROR)
Can anyone please help me.
I am getting a error displayed when data into any cell on sheet 2
This only started to happen after i set up codes for displaying pictures (wmf) and standard excell autoshapes on sheet 1.
The error reads:
Run-time error'-214702809(80070057)':
The item with the specified name wasn't found.
Please help
rosspmm
06-30-2005, 02:51 AM
Can you supply the code so we can review?
springbrook
06-30-2005, 04:18 AM
I will have to send you the code tommorow as it is on computer at work, however below is what i added to it for the picture to automaticly dispaly.
'Private Sub Worksheet_Calculate()
'If Range("A1").Value > 100 Then
'ActiveSheet.Shapes("Picture 1").Visible = False
'Else
'ActiveSheet.Shapes("Picture 1").Visible = True
'End If
'End Sub
Killian
06-30-2005, 04:26 AM
I can't see why this wouldn't work - the error implies that your picture isn't named "Picture 1" or doesn't exist on the active worksheet
springbrook
06-30-2005, 04:38 AM
The name of the pitcure (standard excel autoshape) is "hardware arrow". I tripple checked the name of the picture, even tried a new name and altered the code to reflect. The code actualy works if enter a an amount less than 100, but when i go to enter data in sheet 2 thats when i get the error message.
could it be because of other code above this one (that was already there)?
where can i view all of the pictures/images that have names assigned to them?
Killian
06-30-2005, 06:23 AM
I've knocked up a quick user form that lists all the shapes on the active sheet and shows/hides the selected one - I'm hoping that might diagnose your problem.
It could be that the sheet that a shape you are trying to manipulate is sitting on, is not the active sheet when your code is running???
springbrook
07-01-2005, 05:05 PM
I have now fixed the problem,
The first line should have read:
Private Sub Worksheet_Change(ByVal Target As Range)
and not:
'Private Sub Worksheet_Calculate()
Thanks for all your help any way guys
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.