Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What is the correct syntax to select all the cells in a sheet (so I can then
format the cells)? Manually, I would use shift-ctrl-end, selecting from A1 to the last cell. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
With Cell A1 active
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select Regards Rowan "djh" wrote: What is the correct syntax to select all the cells in a sheet (so I can then format the cells)? Manually, I would use shift-ctrl-end, selecting from A1 to the last cell. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You don't usually need to select the cells to work with them.
with activesheet.usedrange.cells .numberformat = "General" end with (If row 1 isn't used and if column A isn't used, it won't be included.) With ActiveSheet With .Range("a1", .UsedRange) .NumberFormat = "general" End With End With Will get A1 to the bottom right corner. Or all the cells with activesheet.cells .numberformat = "General" end with djh wrote: What is the correct syntax to select all the cells in a sheet (so I can then format the cells)? Manually, I would use shift-ctrl-end, selecting from A1 to the last cell. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select cells according to row number in different sheet | Excel Discussion (Misc queries) | |||
Up down arrow keys do not select cells if select locked cells unch | Excel Discussion (Misc queries) | |||
Still can select locked cells in protected sheet | New Users to Excel | |||
is it possible to select and change the values of cells in a minimized excel spread sheet from vba? | Excel Worksheet Functions | |||
how can i select all the cells with same color on a sheet if there are multipale colors by vba code | Charts and Charting in Excel |