ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Redefining Styles (https://www.excelbanter.com/excel-programming/304412-redefining-styles.html)

Grant Reid

Redefining Styles
 
Hi

I have a Workbook in which I have defined a style and applied this style to a number ranges in multiple worksheets. What I'm trying to do is to able to make a change in one of the ranges where this particular style has been applied and then apply the change to all ranges were this style has been applied.

I can do this manually by higlighting the reformatted range, navigating through the menu "Format", "Style" and then re-entering the style name. I am then prompted if I want to redefine the style based on my selection. When I click the "Yes" button, the changes are cascaded to all the ranges with that particular style. However I do not seem to able to program this. Can anyone help?

Kind Regards - Grant


Grant Reid

Redefining Styles
 
Hi All

Managed to sort this out myself.

Sub Change_Style
ActiveWorkbook.Styles.Add Name:="_HD1", BasedOn:=ActiveCell
End Sub

Many Thanks - Grant




All times are GMT +1. The time now is 11:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com