![]() |
With End using multiple ranges
Is it possibe to use With End stmts on muliple ranges. Below I am adjsuting
the properties of one range. If I want to do this to two separate ranges, can I append the With part of the statement to also take the second range ("SecondCell"). Thanks With Range("FirstCell") .Interior.Pattern = xlGray50 .Locked = True .FormulaHidden = False .Validation.InCellDropdown = False End With |
With End using multiple ranges
Try
With Range("FirstCell, SecondCell") 'do something here End With -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England www.nickhodge.co.uk HIS "ExcelMonkey" wrote in message ... Is it possibe to use With End stmts on muliple ranges. Below I am adjsuting the properties of one range. If I want to do this to two separate ranges, can I append the With part of the statement to also take the second range ("SecondCell"). Thanks With Range("FirstCell") .Interior.Pattern = xlGray50 .Locked = True .FormulaHidden = False .Validation.InCellDropdown = False End With |
With End using multiple ranges
Perfect, thanks.
"Nick Hodge" wrote: Try With Range("FirstCell, SecondCell") 'do something here End With -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England www.nickhodge.co.uk HIS "ExcelMonkey" wrote in message ... Is it possibe to use With End stmts on muliple ranges. Below I am adjsuting the properties of one range. If I want to do this to two separate ranges, can I append the With part of the statement to also take the second range ("SecondCell"). Thanks With Range("FirstCell") .Interior.Pattern = xlGray50 .Locked = True .FormulaHidden = False .Validation.InCellDropdown = False End With |
All times are GMT +1. The time now is 05:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com