Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hide pasted graphics (2002)

    I'd really like to be able to hide graphics (pasted screen shots) in comments
    so the user has to view the comment to see the screen shot, but you can't
    paste graphics into comments. Is there a way to hide these graphics so
    the user can click something to reveal the images?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Hide pasted graphics (2002)

    Here is a thought (there are other ways)
    Could you put the graphics in a Userform?

    Then have a button on the sheet that puts a particular picture in the userform based on the activecell and shows the form?

    You could also add the comments to the form.

    You could get fancy and ONLY have the button visible/active when the active cell was particular cells (via worksheet selection_change event) or the selection change could SHOW the picture automatically if desired.

    Steve

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Hide pasted graphics (2002)

    Kevin,

    Pictures and Graphics are part of the Shapes collection of a Worksheet. If you have an image called Picture1, then the following code should make it hidden :

    ActiveSheet.Shapes("Picture1").Visible = False

    Attached find a sample with a command button to toggle Show/Hide.

    Right click on the Sheet tab and select View Code.

    Andrew

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hide pasted graphics (2002)

    Andrew,

    That is, of course, very cool. But I'm trying to do this at the
    "user" level. IOW, no code, if possible. The user needs to be able
    to do a Alt-PrintScr, then paste the screen shot into the
    worksheet, then hide the pic.

    Humm. I could put a button on the sheet like you did, and have the
    code behind it set all the pics in, say, column D or whatever go invisible.

    That might work...But the user would have to make sure the pic got
    pasted in column D. Are pics "anchored" in cells or is there a
    "drawing" layer like Word?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  5. #5
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hide pasted graphics (2002)

    Steve,
    The less code in this little project the better. I think I need something
    without userforms -- although, as a programmer, I see your gears
    turning and appreciate the feedback...
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  6. #6
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Hide pasted graphics (2002)

    You could write code (or get our help) to have them copy the screenshot and then by pushing a button it would paste, resize, place the picture, hide it and do whatever else you wanted. Easy on the user.

    It sounds like you are looking at a 2 step problem:
    1)User has to copy, place, screen shot
    2) then another user will do something to view the screenshots

    Could you give some details of what you would like the code to do and how it would be setup? Both parts could be automated.

    Steve

  7. #7
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hide pasted graphics (2002)

    Hi Kevin

    I'd be most interested to know how to place graphics within cells too. My limited understanding was that they belonged to a layer, as you describe it, rather than being able to be "anchored" inside cells. I had a problem a while back, where I wanted the .JPG graphic corresponding to a path/file reference, to be displayed in the cell containing said reference.

    Alan

  8. #8
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hide pasted graphics (2002)

    Alan,

    Try the following code:

    Range("g6").Select
    oPicture =

  9. #9
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Hide pasted graphics (2002)

    If you make the cell wide enough and tall enough to complete enclose the picture, you can format the picture to move and size with the cell and it will stay with the cell thru most operations (you can even sort with it this way)

    This would be equivalent to having a "graphic" as a field in a database.

    It gets more squirrely if the graphic goes across rows and columns. If you insert/delete col or rows the graphic will change size, but moving individual cells does not change the size, but moving an entire region of cells enclosing the picture will move the picture.

    Steve

  10. #10
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hide pasted graphics (2002)

    Thanks John, and to Steve for the extra information. I'll certainly give the code a shot. To get specific about the particular project I have in mind, the sheets contain records from a product catalogue with one product per row. One of the columns contains a file reference to a folder that "lives" directly below the .xls. A typical entry might be "pk104.jpg" for product pk104. However, this entry might be the same for the next half a dozen rows - pk104s, pk104t etc. It would therefore be desirable for the graphic to "span" the rows it applies to, but be "attached" to the pk104 cell. Also, all the graphics would appear in the one column, so the column width will be set to the maximum graphic width on that sheet (easy enough).

    The whole thing was derived from a Word doc, where merging cells in a table was used to achieve this "row spanning" effect. At the moment, I have simply used a toolbar button that displays the graphic of the active row in a modal self-sizing popup, but this idea is not conducive to printing the catalogue with graphics, the way it could be done in Word. There are also different issues for onscreen and printed views involving multiline cell entries, but I have addressed (most of) these with appropriate code and commandbar buttons, to produce various "views".

    Any further suggestions for this configuration most welcome, of course.

    Alan

  11. #11
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Hide pasted graphics (2002)

    Why not just use hyperlinks to open the original source? You could put each link into a cell (it shouldn't matter if you have the multiple links to the same location).

    Clicking on the link will open the jpeg files with the appropriate associated program.

    Steve

  12. #12
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hide pasted graphics (2002)

    I toyed with hyperlinks, but users found it distracting jumping to & from IE/Excel. They liked the way the little popups worked though. The real problem I had with this project though, relates to the printable version, rather than the onscreen presentation & navigation. That is, getting the pictures "physically" into cells, with the appropriate cell "spanning", and the ability to print the whole show properly.

    Alan

  13. #13
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Hide pasted graphics (2002)

    Some thoughts:
    I would think about 2 versions. A "printable" one with all the pictures in the right locations and the "viewable" one. It is tough to have something that meets both well.

    One should be the master if you are going to edit directly onto it and the other should be based on the "master" so when the master is updated the other is also updated.

    Or you just work with the viewable one (with popups) and have a macro to "create the printable" whenever you want to print it.

    I have heard that a "pdf" vesion can still maintain some excel features, though I have never used this.

    Steve

  14. #14
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hide pasted graphics (2002)

    Interesting thoughts. I've thought about lots of alternatives myself during this ongoing project. One was to try to "export" the spreadsheets to a Word doc, where a table structure might provide better formatting options. Another was to use HTML with image tags around the links to the graphics. There are so many issues here, not helped by the client adding to the project all the time, and being blissfully oblivious to the difficulties involved, like why you can't manage to print 60cm of columns across an A4 page <img src=/S/groan.gif border=0 alt=groan width=16 height=15>

    Certainly the idea of a master is an important one, with "views" derived from only that, via references/links. The printable version, if it ever comes off, would be exactly that, with no need for any "Excel features" save for the rows & columns.

    Thanks for the input, and for anything else you might suggest.

    Alan

  15. #15
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hide pasted graphics (2002)

    Steve,
    ok, this is now a dev project for me and your code
    will be most helpful. just the kick I need. Thanks.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

Page 1 of 2 12 LastLast

Posting Permissions

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