Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting data programmatically
Is there anyway we can programmatically select the data rows and columns that
the active cell belongs to? Similar what excel charting does. For example in case of Excel chart you just select a single cell, and say insert chart it automatically detects the data that the active cell is part of and charts it. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting data programmatically
Sub rowss()
ActiveCell.EntireRow.Select End Sub Sub columnss() ActiveCell.EntireColumn.Select End Sub -- Gary''s Student - gsnu200785 "guest" wrote: Is there anyway we can programmatically select the data rows and columns that the active cell belongs to? Similar what excel charting does. For example in case of Excel chart you just select a single cell, and say insert chart it automatically detects the data that the active cell is part of and charts it. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting data programmatically
I think this logic selects only one row and one column or am I missing
something here? "Gary''s Student" wrote: Sub rowss() ActiveCell.EntireRow.Select End Sub Sub columnss() ActiveCell.EntireColumn.Select End Sub -- Gary''s Student - gsnu200785 "guest" wrote: Is there anyway we can programmatically select the data rows and columns that the active cell belongs to? Similar what excel charting does. For example in case of Excel chart you just select a single cell, and say insert chart it automatically detects the data that the active cell is part of and charts it. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting data programmatically
Hi Guest,
Try: Dim Rng As Range Set Rng = Activecell.CurrentReguon --- Regards. Norman "guest" wrote in message ... Is there anyway we can programmatically select the data rows and columns that the active cell belongs to? Similar what excel charting does. For example in case of Excel chart you just select a single cell, and say insert chart it automatically detects the data that the active cell is part of and charts it. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting data programmatically
Hi Guest,
Set Rng = Activecell.CurrentReguon Correcting a typo, try: '========= Public Sub Tester() Dim Rng As Range Set Rng = ActiveCell.CurrentRegion MsgBox Rng.Address(0, 0) End Sub '<<========= --- Regards. Norman |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting data programmatically
Yes.
If you want the "table" that the cell is a part of, follow Norman's suggestion: Sub missive() ActiveCell.CurrentRegion.Select End Sub -- Gary''s Student - gsnu200785 "guest" wrote: I think this logic selects only one row and one column or am I missing something here? "Gary''s Student" wrote: Sub rowss() ActiveCell.EntireRow.Select End Sub Sub columnss() ActiveCell.EntireColumn.Select End Sub -- Gary''s Student - gsnu200785 "guest" wrote: Is there anyway we can programmatically select the data rows and columns that the active cell belongs to? Similar what excel charting does. For example in case of Excel chart you just select a single cell, and say insert chart it automatically detects the data that the active cell is part of and charts it. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting data programmatically
thanks.
"Norman Jones" wrote: Hi Guest, Set Rng = Activecell.CurrentReguon Correcting a typo, try: '========= Public Sub Tester() Dim Rng As Range Set Rng = ActiveCell.CurrentRegion MsgBox Rng.Address(0, 0) End Sub '<<========= --- Regards. Norman |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting range programmatically | Excel Programming | |||
Programmatically selecting first worksheet | Excel Programming | |||
Programmatically selecting first worksheet | Excel Programming | |||
Selecting most of very many programmatically | Excel Programming | |||
Selecting Rows Programmatically | Excel Programming |