Results 1 to 18 of 18

show hide shape to a cell problem with code

Threaded View

pavlos_x show hide shape to a cell... 03-18-2015, 01:43 PM
LJMetzger Re: show hide shape to a cell... 03-22-2015, 02:51 PM
pavlos_x Re: show hide shape to a cell... 03-22-2015, 04:23 PM
LJMetzger Re: show hide shape to a cell... 03-22-2015, 04:48 PM
pavlos_x Re: show hide shape to a cell... 03-23-2015, 04:36 AM
LJMetzger Re: show hide shape to a cell... 03-23-2015, 02:27 PM
pavlos_x Re: show hide shape to a cell... 03-23-2015, 03:47 PM
LJMetzger Re: show hide shape to a cell... 03-23-2015, 04:30 PM
pavlos_x Re: show hide shape to a cell... 03-24-2015, 07:34 AM
pavlos_x Re: show hide shape to a cell... 03-25-2015, 03:43 AM
LJMetzger Re: show hide shape to a cell... 03-25-2015, 08:24 AM
pavlos_x Re: show hide shape to a cell... 03-25-2015, 11:28 AM
LJMetzger Re: show hide shape to a cell... 03-25-2015, 12:02 PM
pavlos_x Re: show hide shape to a cell... 03-25-2015, 12:59 PM
LJMetzger Re: show hide shape to a cell... 03-26-2015, 12:35 PM
pavlos_x Re: show hide shape to a cell... 03-26-2015, 02:01 PM
LJMetzger Re: show hide shape to a cell... 03-26-2015, 02:24 PM
pavlos_x Re: show hide shape to a cell... 03-26-2015, 02:43 PM
  1. #1
    Registered User
    Join Date
    02-10-2015
    Location
    cyprus
    MS-Off Ver
    2010
    Posts
    50

    show hide shape to a cell problem with code

    i have the following code, the first part which is show/hide rows works fine. the second part of the code is not working very well. is suppose to hide "LOAD" (1 until 60) whenever there is a number in cell D12:D71.
    it used to work really nice in another sheet but now just hides several of them i don't know why.
    can you please help me.

    p.s. TMS helped me in the past with this code

    code for excell file is 12341

    Option Explicit
    
    Private Sub Worksheet_change(ByVal Target As Range)
    
    If Not Intersect(Target, Range("L1")) Is Nothing Then
        Application.ScreenUpdating = False
        Rows("12:72").EntireRow.Hidden = False
        Select Case InStr(UCase(Range("L1")), "WAY DB") > 0
            Case True: Rows(Left(Range("L1"), --(InStr(Range("L1"), " ") - 1)) + 12 & ":72").EntireRow.Hidden = True
        End Select
        Select Case Range("L1").Value
            Case Is = "UNHIDE": Rows("13:72").EntireRow.Hidden = False
            Case Else
            Application.ScreenUpdating = True
        End Select
    End If
    
    Dim i As Long
    Const iMin As Long = 12
    Const iMax As Long = 71
    
    For i = iMin To iMax
        If Range("D" & i).Value > "1" Then
            ActiveSheet.Shapes("load" & i - 2).Visible = True
        Else
            ActiveSheet.Shapes("load" & i - 2).Visible = False
        End If
    Next 'i
    
    End Sub
    this my excel file
    exe1.xlsm
    Last edited by pavlos_x; 03-18-2015 at 01:48 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] show hide shape to a cell according to its value
    By pavlos_x in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-14-2015, 05:34 PM
  2. Show/Hide Group of shapes while keeping individual shape visibility settings
    By Voldenite in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-14-2015, 03:12 AM
  3. Hide/show shape on Sheet1 based on cell value in Sheet2?
    By Guple in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-05-2013, 02:12 PM
  4. Show/Hide Shape VBA
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-06-2013, 09:03 AM
  5. Show & Hide Shape in a Sheet
    By Pete Csiszar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-14-2005, 10:07 PM

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