+ Reply to Thread
Results 1 to 15 of 15

The amazing not disappearing box

  1. #1
    Forum Contributor
    Join Date
    03-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016 (among others!)
    Posts
    331

    The amazing not disappearing box

    This seems truly bizarre to me so hopefully it's something stupid someone can help with.

    On my sheet I have a series of conditionally formatted boxes to make them essentially vanish when I need them to. There are also two boxes involved. I drew a blank rectangle (automatically called "rectangle 1") and have copied a small picture from elsewhere in the book and renamed it "pic110" (learning from previous mistakes).

    When there is a change in a given cell both the shapes are either hidden or shown. However, as it is only the rectanglebehaves as it should. The other box stays there all the time. They are in the same if statement and if I carve out the code for the pic and stick it as a seperate macor it will run ok (when manually run, nto when called by the worksheet_change event).

    I'm going bald here. ANyone any ideas? Thanks in advance.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: The amazing not disappearing box

    You want to share the workbook? And the code? Or do we play 20 questions?
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    03-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016 (among others!)
    Posts
    331

    Re: The amazing not disappearing box

    You don't fancy 20 questions then? CAn't share the workbook but here's the code.

    Please Login or Register  to view this content.
    Cell u8 is the cell that is used to conditionally format everything else as well - it's a simple y/n option. J7 is the cell the user changes. Rectangle 5 works perfectly but not pic110.

    If I do:

    Please Login or Register  to view this content.
    And run either of them the ox disappears and reappears like magic. So I'm at an utter loss as to what the problem is.

  4. #4
    Forum Contributor
    Join Date
    03-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016 (among others!)
    Posts
    331

    Re: The amazing not disappearing box

    Scrap all that. NO idea why but without changing it it now works. Been having a few issues like that lately. My personally favourite is where cell E3 shows £3,000, cell D3 says =E3 and D3 shows......£2,000.

    Thanks anyway.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: The amazing not disappearing box

    I suspect the problem is the name "pic110". PIC110 is actually a cell reference, so I would suggest you check the actual name of the picture.

    I wasn't able to insert a picture and call it pic110 because every time I tried to name it in the Name box, it just selected cell PIC110.

    It is possible to change whatever it IS called to "pic110" but it may be safer to call it something else.

    See the attached sample.

    Regards, TMS
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    03-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016 (among others!)
    Posts
    331

    Re: The amazing not disappearing box

    It's still called that but if I have problems again I'll certainly change it. Thanks for that piece of help though. I've really no idea why it has suddenly decided to work. It's getting temperamental in MY old age :-s

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: The amazing not disappearing box

    cell E3 shows £3,000, cell D3 says =E3 and D3 shows......£2,000.

    One way: use Custom format: "£2,000"


    Regards, TMS

  8. #8
    Forum Contributor
    Join Date
    03-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016 (among others!)
    Posts
    331

    Re: The amazing not disappearing box

    You may have misread that - or maybe I'm being thick. They were both formatted the same way - just the number shown wasn't the same. I tried another cell using E3 as the target and the same happened. Are you saying the format may change the number shows such as that?

    Talking of which (seeing as you are being so helpful) sometimes I type in formule (or cut and paste) and the cell then shows the formula rather than the result. I have to cut the text, paste it elsewhere and then cut that cell back to the original position. Have I missed something there too?

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: The amazing not disappearing box

    Are you saying the format may change the number shows such as that?
    I'm saying the format can change what you see, not the actual value of the cell. You haven't shared the workbook where this happens so I can only guess.

    the cell then shows the formula rather than the result.
    The target cell, where you paste the formula is probably (almost certainly) formatted as Text.

    Regards, TMS

  10. #10
    Forum Contributor
    Join Date
    03-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016 (among others!)
    Posts
    331

    Re: The amazing not disappearing box

    The first two cells were formatted the same. I even went into the format cells dialogue box to double check and change the number type in case there was something odd. I tend to use custom format styles for shortcuts to make life easier.

    re the formatted as text, they may have been before pasting but even after again changing the style it was showing the formula. It's not something that has ever happened to me until the last batch of spreadsheets I've had to do.

    Going back to the £3,000 £2,000 thing - how could the format change what's shown? I understand if I used round or something I could change it (and similarly format I would guess ie from 2,345 to 2,000) but how would it work with 3,000 to 2,000. I'm intrigued now.

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: The amazing not disappearing box

    A format just changes what is displayed, not what is in the cell. So, for example, if you type a date into a cell it will automatically be formatted as a date. If you change the format of that cell to General, it will show as a numeric value.

    A function like ROUND will change the calculated value in the cell. For example, =INT(200.456) will have the result 200.

  12. #12
    Forum Contributor
    Join Date
    03-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016 (among others!)
    Posts
    331

    Re: The amazing not disappearing box

    That's what I thought. JUst when you said you thought the formatting was different so that D3 and E3 should a different answer I thought I had missed something all these years. Glad I haven't

    Thanks very much for your time. Much appreciated.

  13. #13
    Registered User
    Join Date
    10-03-2007
    Location
    Twin Cities, MN
    MS-Off Ver
    2003
    Posts
    83

    Re: The amazing not disappearing box

    Not trying to hijack your thread, but so far this is the closest i have found to my issue even with a bunch of searching. You mentioned the name "pic110" is a cell reference and to change it so something else. How do you access that? I have a similar issue getting my code to move a picture behind a blank rectangle. I need to rename the picture object but I can't seem to figure out how.

    Any tips?

  14. #14
    Forum Contributor
    Join Date
    03-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016 (among others!)
    Posts
    331

    Re: The amazing not disappearing box

    Ah ha. Somethign I can help with

    If you right click on the object you can go to properties and then rename the box in the window that appears. Hopefully that works for you

  15. #15
    Forum Contributor
    Join Date
    03-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016 (among others!)
    Posts
    331

    Re: The amazing not disappearing box

    If that doesn't work - depends on the type of item I think - try this http://www.excelforum.com/excel-prog...ml#post3562424 That'll definitely sort it for you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. i wand create amazing calculator in my sheet
    By medo82006 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2014, 01:04 AM
  2. Been Here Before... Amazing how helpful
    By thinksnowjob in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 01-14-2013, 10:24 PM
  3. Need quick answer PIVOT/Transpose problem/solution
    By exceldba in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-19-2012, 02:03 PM
  4. Replies: 2
    Last Post: 01-07-2012, 11:23 PM
  5. [SOLVED] These templates are amazing! This really shows you care about us!
    By PatHaugen in forum Excel General
    Replies: 0
    Last Post: 06-16-2005, 08:05 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