+ Reply to Thread
Results 1 to 5 of 5

Show level in cylinder

Hybrid View

  1. #1
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Show level in cylinder

    I changed the fill on your shape to have 4 stops then used this code to change the fill level when column D changes:

    Option Explicit
    Private Sub Worksheet_Change(ByVal Target As Range)
    
    If Application.Intersect(Range("D:D"), Target) Is Nothing Then Exit Sub
    
    Dim p As Double
    
    p = 1 - Range("H4").Value
    If p < 0 Then p = 0
    If p > 1 Then p = 1
    
    With ActiveSheet.Shapes("Can 1").Fill
        .GradientStops(3).Position = p
        .GradientStops(2).Position = p
    End With
    
    End Sub
    See attached - add or change values in column D.

    WBD
    Attached Files Attached Files
    Office 365 on Windows 11, looking for rep!

  2. #2
    Registered User
    Join Date
    07-05-2022
    Location
    Bunbury
    MS-Off Ver
    2019
    Posts
    2

    Thumbs up Re: Show level in cylinder

    Thanks for that , works perfectly.

+ 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. [SOLVED] Extracting the 1 level lower part numbers based on Level numbers in multi level BoM
    By Sekars in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-03-2022, 05:35 AM
  2. Formula for a horizontal cylinder
    By David212 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-03-2019, 10:39 AM
  3. Trying to get a zoom level to show a complete range on any screen.
    By j_Southern in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-09-2018, 12:52 PM
  4. Replies: 3
    Last Post: 12-08-2015, 10:07 AM
  5. Clustered Cylinder Graph
    By steph67 in forum Excel General
    Replies: 4
    Last Post: 12-19-2010, 01:02 PM
  6. Replies: 1
    Last Post: 04-23-2008, 07:33 AM
  7. Replies: 1
    Last Post: 02-28-2006, 08:40 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