Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-14-2016, 02:44 AM
johaneriksson johaneriksson is offline Pattern Style Windows 7 32bit Pattern Style Office 2013
Novice
Pattern Style
 
Join Date: Oct 2016
Posts: 1
johaneriksson is on a distinguished road
Default 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
Reply With Quote
Reply



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
Pattern Style 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
Pattern Style Background image printing as a pattern tallon Word 3 08-31-2012 03:31 AM
Pattern Style MSWord false pattern or background????? controlengineer Drawing and Graphics 3 04-02-2011 06:14 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft