Results 1 to 3 of 3

Hide Shape based on text entered in another worksheet

Threaded View

  1. #1
    Registered User
    Join Date
    01-28-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    30

    Hide Shape based on text entered in another worksheet

    Not sure if I'm going about this the right way, but I'd like to hide a shape in another worksheet if text is entered in a cell in the first worksheet.
    Cell B9 corresponds with one worksheet, B10 with the next worksheet, etc, each with the same named shape in the subsequent worksheet.

    As I have it, I'm getting an error that the named object "DoNotUse" is not recognized...

    Your help would be appreciated. Thanks!

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim i As Long
    Dim WS As Worksheet
    
    
    For i = 9 To 18
        If Range("B" & i).Value <> "" And Range("I" & i).Value > 0 Then
                For Each WS In Worksheets
                    If .Range("C3").Value = "SAP Material" Then
                        Shapes("DoNotUse").Visible = False
                            Else
                        Shapes("DoNotUse").Visible = True
                    End If
                Next
        End If
    Next i
                        
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1