ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How Does VBA Know Which Cell Its On (https://www.excelbanter.com/excel-discussion-misc-queries/107092-how-does-vba-know-cell-its.html)

cincode5

How Does VBA Know Which Cell Its On
 
Just curious to know something. If I were to select any cell on a worksheet,
how does VBA know what that cell is. In other words, I know I can select a
cell from a macro using Range("A1").Select, for example, but what would the
line of code be that activates or identifies a cell when I click on it. Does
that make sense?
--
Regards...

Don Guillett

How Does VBA Know Which Cell Its On
 
msgbox activecell.address


--
Don Guillett
SalesAid Software

"cincode5" wrote in message
...
Just curious to know something. If I were to select any cell on a
worksheet,
how does VBA know what that cell is. In other words, I know I can select
a
cell from a macro using Range("A1").Select, for example, but what would
the
line of code be that activates or identifies a cell when I click on it.
Does
that make sense?
--
Regards...




cincode5

How Does VBA Know Which Cell Its On
 
Awesome, how simple was that...

Thanks Don.
--
Regards...


"Don Guillett" wrote:

msgbox activecell.address


--
Don Guillett
SalesAid Software

"cincode5" wrote in message
...
Just curious to know something. If I were to select any cell on a
worksheet,
how does VBA know what that cell is. In other words, I know I can select
a
cell from a macro using Range("A1").Select, for example, but what would
the
line of code be that activates or identifies a cell when I click on it.
Does
that make sense?
--
Regards...





Don Guillett

How Does VBA Know Which Cell Its On
 
it's only simple when you know how

--
Don Guillett
SalesAid Software

"cincode5" wrote in message
...
Awesome, how simple was that...

Thanks Don.
--
Regards...


"Don Guillett" wrote:

msgbox activecell.address


--
Don Guillett
SalesAid Software

"cincode5" wrote in message
...
Just curious to know something. If I were to select any cell on a
worksheet,
how does VBA know what that cell is. In other words, I know I can
select
a
cell from a macro using Range("A1").Select, for example, but what would
the
line of code be that activates or identifies a cell when I click on it.
Does
that make sense?
--
Regards...








All times are GMT +1. The time now is 03:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com