Consulting

Results 1 to 7 of 7

Thread: URGENT HELP REQ. (RUN-TIME ERROR)

  1. #1

    URGENT HELP REQ. (RUN-TIME ERROR)

    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

  2. #2
    VBAX Regular
    Joined
    Jun 2005
    Posts
    13
    Location
    Can you supply the code so we can review?

  3. #3
    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
    Last edited by Killian; 06-30-2005 at 04:21 AM. Reason: Removed mysterious links

  4. #4
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    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
    K :-)

  5. #5
    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?

  6. #6
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    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???
    K :-)

  7. #7
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •