It's very common to use With..
But it's not used correctly in that example.
The With is completely useless in that example.
When you use With, you are referring to some object.
Usually a range like ("A1:A10") or a Sheet or Book.
Then in subsequent code (before the End With), you refer to that object with a period.
Like
Code:
With Range("A1:A10")
.Interior.ColorIndex = 3
.Font.Bold = True
End With
It's usefull when you need to make multiple commands on the same object.
Makes it easier, you don't have to rewrite the same object over and over again.
But your example does not use the period in to refer to the object referenced (ActiveCell)
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.