Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have some table, I want in my VB code to select all the cells in th
table except the header. How do I do that so if I will want to add in the future another cell to this table the VBA code will include automatically this cells? I had try to user the Lines: Range(ActiveCell, ActiveCell.End(xlDown)).Select Range(ActiveCell, ActiveCell.End(xToRight)).Select (The active cell is "A2" -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Pandi
See VBA help for CurrentRegion and Offset HTH Regards Pascal "Pandi " a écrit dans le message de ... I have some table, I want in my VB code to select all the cells in the table except the header. How do I do that so if I will want to add in the future another cells to this table the VBA code will include automatically this cells? I had try to user the Lines: Range(ActiveCell, ActiveCell.End(xlDown)).Select Range(ActiveCell, ActiveCell.End(xToRight)).Select (The active cell is "A2") --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Some sample code:
Dim Tbl As Range Set Tbl = Range("A1").CurrentRegion Tbl.Offset(1, 0).Resize(Tbl.Rows.Count - 1, _ Tbl.Columns.Count).Select Regards Pascal "papou" <DésoléPasDeMail a écrit dans le message de ... Hello Pandi See VBA help for CurrentRegion and Offset HTH Regards Pascal "Pandi " a écrit dans le message de ... I have some table, I want in my VB code to select all the cells in the table except the header. How do I do that so if I will want to add in the future another cells to this table the VBA code will include automatically this cells? I had try to user the Lines: Range(ActiveCell, ActiveCell.End(xlDown)).Select Range(ActiveCell, ActiveCell.End(xToRight)).Select (The active cell is "A2") --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Up down arrow keys do not select cells if select locked cells unch | Excel Discussion (Misc queries) | |||
Macro to select cells without a certain value and select a menu it | Excel Worksheet Functions | |||
Using formulas to select cells (Ex: Select every nth cell in a col | Excel Discussion (Misc queries) | |||
how do you "select locked cells" w/o "select unlocked cells"? | Excel Discussion (Misc queries) | |||
Why aren't my cells highlighted when I select multiple cells? | Setting up and Configuration of Excel |