Wow... I have just done a testing.. and surprising result.. I created a new workbook and created a module.. Then ran the same code
it works.. It's something about the that workbook... I think some setting attached to the workbook is causing the issue.. Anyone has any idea?? I keep getting ** For Each may only iterate over a collection object or an array ..** On Sep 23, 8:14 pm, airen <airen1...@gmail.com> wrote: > Dear markkim, > you forgot to write rcell after next > > Sub selection_area() > Dim rcell As Range > For Each rcell In Selection > rcell.Value = 1 > Next rcell > End Sub > > Thanks and Regards > Akhilesh Airen -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel