I want to Select a range based on a named range "test" (that may change).
My New selected range are to consist of the named range, but not the first two columns.
This is my try:
Sub test2()
rader = Range("test").Rows.Count
kolonner = Range("test").Columns.Count
kolonner = Range("test").Columns.Count
With Range("test")
.Cells(.Cells(1, 3), .Cells(rader, kolonner)).Select
End With
The result is one cell selected - the one that is one up and one left from the range's upper left corner.
Regards
Torstein
__._,_.___
Posted by: Torstein Johnsen <sejohnse@yahoo.no>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
.
__,_._,___
Tidak ada komentar:
Posting Komentar