#1
|
|||
|
|||
Pattern Style
Hello!
I have a large Excel file where the data is retrieved from a database and exported to Excel where graphing is formed. The color of the different parts of the graph is controlled by a function in which you fill in a cell in another worksheet, and code reading of it. The problem is that the code will only work as long as there is one color, now I want to use my pattern, in this way, the Format Cells -> Fill -> Pattern style. Therefore, I must add a line of code that says it will color the graph similar to the cell even if it has chosen a pattern style. I copy the code to that part of the function that is relevant. If more of the code to the whole operation is needed or any questions arise I answer directly. For i = 1 To serCount If i = serCount + 1 Then Exit For If .SeriesCollection(i).Name = "" Or inCollection(.SeriesCollection(i).Name, excludedCol) Then .SeriesCollection(i).Delete i = i - 1 serCount = serCount - 1 Else If inCollection(.SeriesCollection(i).Name, areaCol) Then .FullSeriesCollection(i).ChartType = xlAreaStacked .FullSeriesCollection(i).Format.Fill.ForeColor.rgb = _ getRGB(findInSub(setupAC, findInCategory(tables, _ Right(tbl.Name, Len(tbl.Name) - 3)).offset(0, 5), areaC, _ .SeriesCollection(i).Name)) Else .FullSeriesCollection(i).ChartType = xlLineStacked .FullSeriesCollection(i).Format.line.Weight = 2.5 .FullSeriesCollection(i).Format.line.ForeColor.rgb = _ getRGB(findInSub(setupLC, findInCategory(tables, _ Right(tbl.Name, Len(tbl.Name) - 3)).offset(0, 6), lineC, _ .SeriesCollection(i).Name)) End If End If / Johan |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Find and select all string of simlar pattern | anon123 | Word | 4 | 04-20-2016 11:41 PM |
How to Extract Data from table based on pattern. | PRA007 | Word Tables | 4 | 03-17-2015 11:05 PM |
Find & Replace: Wildcards (except this pattern) | tinfanide | Word | 6 | 01-26-2014 06:39 AM |
Background image printing as a pattern | tallon | Word | 3 | 08-31-2012 03:31 AM |
MSWord false pattern or background????? | controlengineer | Drawing and Graphics | 3 | 04-02-2011 06:14 AM |