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 / Programming / January 2006

Tip: Looking for answers? Try searching our database.

In macros, an instruction that will return the position of the Active Cell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
aca - 20 Jan 2006 11:12 GMT
In a macro, how can I make it show the position of the Active Cel
(Column/Line).
Or how can I set that position as a Condition; e.g. “If ActiveCell i
B7 Then….”
Or “If ActiveCell belongs to Column G Then….”
Thanks in advance for any help.
AC

--
ac
Leith Ross - 20 Jan 2006 22:50 GMT
Hello Aca,

The following examples should help answer your questions. Reversing the
equations will set the ActiveCell address, column, or row to that value.

The Address: Addx = ActiveCell.Address
The Column:  Col = ActiveCell.Column
The Row:  Row = ActiveCell.Row

Sincerely,
Leith Ross

Signature

Leith Ross

Ken Johnson - 20 Jan 2006 22:55 GMT
Hi aca
>how can I make it show the position of the Active Cell<
MsgBox ActiveCell.Address
MsgBox ActiveCell.Column
MsgBox ActiveCell.Row
>how can I set that position as a Condition; e.g. "If ActiveCell is
B7 Then...." <
If ActiveCell.Address = $B$7 Then ...(be careful with this one, must
have the $'s)
>If ActiveCell belongs to Column G Then...<
If ActiveCell.Column = 7 Then...

Ken Johnson
 
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.