Mindpsyche
Well-known Member
- Joined
- Mar 19, 2012
- Messages
- 760
Hello everyone,
In my self learning of vba I stumbled upon a neat website with some nice VBA beginer tips: so i found this website via a linkedin group.
This is the website: http://www.excel-spreadsheet.com/vba/vba.htm
So in one of the sections I found a code that explains the Areas property.
However, when i copy paste this code to the vba editor it gives an error.
Something with the range selection:
This is the code:
Can someone please explain whats wrong with this?
Thanks
In my self learning of vba I stumbled upon a neat website with some nice VBA beginer tips: so i found this website via a linkedin group.
This is the website: http://www.excel-spreadsheet.com/vba/vba.htm
So in one of the sections I found a code that explains the Areas property.
However, when i copy paste this code to the vba editor it gives an error.
Something with the range selection:
This is the code:
Code:
Sub AreaExample()
Sheets(1).Select
UsedRange.Select
MsgBox Selection.Area.Count 'Number '3' - ranges returned
End Sub
Can someone please explain whats wrong with this?
Thanks