Selection Code
Consider the following:
Range(Cells(CurrentRow, 1), Cells(CurrentRow, 7)).Select Selection.Locked = False Selection.FormulaHidden = False Cells(CurrentRow, 9).Select Selection.Locked = False Selection.FormulaHidden = False Is there a way to combine the two select statements into just one? Thanks, Bernie |
Selection Code
With Range(Cells(CurrentRow, 1), Cells(CurrentRow, 7))
.Locked = False .FormulaHidden = False End With With Cells(CurrentRow, 9) .Locked = False .FormulaHidden = False End With -- HTH RP (remove nothere from the email address if mailing direct) "bw" wrote in message ... Consider the following: Range(Cells(CurrentRow, 1), Cells(CurrentRow, 7)).Select Selection.Locked = False Selection.FormulaHidden = False Cells(CurrentRow, 9).Select Selection.Locked = False Selection.FormulaHidden = False Is there a way to combine the two select statements into just one? Thanks, Bernie |
Selection Code
Hi, The following (not tested) doesn't really combine the two operations but it does avoid the need to select With Range(Cells(CurrentRow, 1), Cells(CurrentRow, 7)) .Locked = False .FormulaHidden = False End With With Cells(CurrentRow, 9) .Locked = False .FormulaHidden = False End With Don "bw" wrote in message ... Consider the following: Range(Cells(CurrentRow, 1), Cells(CurrentRow, 7)).Select Selection.Locked = False Selection.FormulaHidden = False Cells(CurrentRow, 9).Select Selection.Locked = False Selection.FormulaHidden = False Is there a way to combine the two select statements into just one? Thanks, Bernie |
Selection Code
Thanks for the replies!
I should have been more specific in my question. The following two select statements: Range(Cells(CurrentRow, 1), Cells(CurrentRow, 7)).Select Cells(CurrentRow, 9).Select can be combined into a single statement as follows: Range("A1:G1,I1").Select So how do I express the single statement using the variable "CurrentRow"? Thanks, Bernie "bw" wrote in message ... Consider the following: Range(Cells(CurrentRow, 1), Cells(CurrentRow, 7)).Select Selection.Locked = False Selection.FormulaHidden = False Cells(CurrentRow, 9).Select Selection.Locked = False Selection.FormulaHidden = False Is there a way to combine the two select statements into just one? Thanks, Bernie |
All times are GMT +1. The time now is 03:52 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com