Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / December 2005

Tip: Looking for answers? Try searching our database.

In VB macro how do I select range from active cell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
spydor - 29 Dec 2005 21:24 GMT
Hey guys and gals, Thanks for lookin at this problemmmmm???

When I am writing a macro using visual basic, how do I select a range
which includes 2 rows down and 8 rows across (selects the range not
just the single cell) from the currently selected/active cell  then
copy it: All this starts from the cell the user starts from.
Example......

PuzzeledProgramer

Signature

spydor

Andrea Jones - 29 Dec 2005 21:33 GMT
   ActiveCell.Range("A1:H2").Select

Andrea Jones
www.allaboutoffice.co.uk
www.allaboutclait.com

> Hey guys and gals, Thanks for lookin at this problemmmmm???
>
[quoted text clipped - 5 lines]
>
> PuzzeledProgramer
Bob Phillips - 29 Dec 2005 21:33 GMT
Activecell.Resize(2,8).Select

Signature

HTH

RP
(remove nothere from the email address if mailing direct)

> Hey guys and gals, Thanks for lookin at this problemmmmm???
>
[quoted text clipped - 5 lines]
>
> PuzzeledProgramer
spydor - 29 Dec 2005 22:33 GMT
Bob...

Sweeeeet!!  This is a nice solution to "ShouldBeSimple" thing to find
with the Excel Help menus.

Sure Appreciate the Info.........

Spydor

Signature

spydor

Gord Dibben - 29 Dec 2005 21:45 GMT
When in VB Editor check out help on "resize"

Gord Dibben  Excel MVP

>Bob...
>
[quoted text clipped - 4 lines]
>
>Spydor
Bob Phillips - 29 Dec 2005 23:11 GMT
Andrea's solution is very similar, it is just perhaps not so obvious that
Range("A1:H2") refers to 2 rows and 8 columns from the actrivcell, it does
not refer to the actual range A1:H2.

Signature

HTH

Bob Phillips

(remove nothere from email address if mailing direct)

> Bob...
>
[quoted text clipped - 4 lines]
>
> Spydor
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.