Yet another Newby question about selecting
My noobness is not diminishing at the pace I was hoping for, so here's
another nooby question: I want to write the code that will select a table based in the currently selected cell. I was thinking something simple like: Range(???).CurrentRegion.Select but I don't know how to equate the ??? to the currently selected cell . Side question: is the currently selected cell also known as the ActiveCell? Thank you for your patience. -gk- |
Yet another Newby question about selecting
"Chip Pearson" wrote in message ... You can use something like ActiveCell.CurrentRegion.Select Doesn't seem to be working. I'm executing the procedure via a command button on the worksheet itself - is this a problem? It looks like this: Private Sub CommandButton2_Click() ActiveCell.CurrentRegion.Select End Sub -gk- |
Yet another Newby question about selecting
I haven't seen the beginning of this thread, but if you are trying to create a macro that does
nothing but what you show below, you don't need a macro and button for that. Excel has a shortcut key. From Help: CTRL+SHIFT+* (asterisk): Select the current region around the active cell (the data area enclosed by blank rows and blank columns). In a PivotTable report, select the entire PivotTable report. What version of Excel are you using? Have you set the TakeFocusOnClick property of your button to False? If you haven't, that may be the problem. There's no ActiveCell once you click the button (it's a bug, fixed in later versions). On Sat, 23 Aug 2003 19:40:50 -0500, "TBA" wrote: "Chip Pearson" wrote in message ... You can use something like ActiveCell.CurrentRegion.Select Doesn't seem to be working. I'm executing the procedure via a command button on the worksheet itself - is this a problem? It looks like this: Private Sub CommandButton2_Click() ActiveCell.CurrentRegion.Select End Sub -gk- |
Yet another Newby question about selecting
"Myrna Larson" wrote in message ... I haven't seen the beginning of this thread, but if you are trying to create a macro that does nothing but what you show below, you don't need a macro and button for that. Excel has a shortcut key. From Help: CTRL+SHIFT+* (asterisk): Select the current region around the active cell (the data area enclosed by blank rows and blank columns). In a PivotTable report, select the entire PivotTable report. What version of Excel are you using? Have you set the TakeFocusOnClick property of your button to False? If you haven't, that may be the problem. There's no ActiveCell once you click the button (it's a bug, fixed in later versions). That did it! And I never would have thought to look there. Thank you! Excel 97 -gk- |
All times are GMT +1. The time now is 04:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com