+ Reply to Thread
Results 1 to 2 of 2

Conditional Formatting on .jpgs

Hybrid View

  1. #1
    Registered User
    Join Date
    03-10-2013
    Location
    Mukilteo, WA
    MS-Off Ver
    Excel 2007
    Posts
    29

    Conditional Formatting on .jpgs

    I have a worksheet that has several .jpg images on it. I want to be able to insert a solid shape over the .jpg images if certain conditions are met. For example, I have picture.jpg pasted over cells F10:F14. If the value in cell G17 = 0, then I want a green box to show up over picture.jpg that blocks out the picture entirely. If G17 > 0, then I want the picture to remain visible on the worksheet. I'm not very skilled with VBA at all so I was hoping someone could help me out.

    thank you.

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Conditional Formatting on .jpgs

    Hello
    Some basic code would be:

    Sub Button1_Click()
    
    Select Case Sheet1.Range("G17")
        Case Is = 0
            Sheet1.Shapes("Rectangle 2").Visible = True
        Case Is = 1
            Sheet1.Shapes("Rectangle 2").Visible = False
    End Select
    
    End Sub
    This is on a Command Button and shows/hides Rectangle 2 on Sheet 1.

    DBY
    Last edited by DBY; 07-21-2016 at 09:51 AM.

+ 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. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  2. Hyperlink from excel table to jpgs and burn a DVD that works on its own
    By exfordy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2013, 05:04 PM
  3. saving charts as jpgs from multiple sheets
    By dadevil in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-22-2010, 09:50 AM
  4. Batch generation of jpgs from charts in Mac Office 2008
    By rajab in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-30-2009, 01:52 AM
  5. Importing jpgs from excel to word data merge
    By comountain in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-07-2009, 03:37 AM
  6. how to make bmp or jpgs graphics be treated as cell values
    By montracan25 in forum Excel General
    Replies: 2
    Last Post: 07-22-2005, 09:05 PM
  7. Add multiple excel worksheets(tabs) with jpgs
    By SunnyHKim@gmail.com in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-13-2005, 03:06 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