![]() |
Excel range selection tool/control?
Excel has this nifty range selection (in Page Setup/Sheet or Function Wizard)
that allows to select a range with the mouse and the control then shows the selected range ($A$1:$B$3 for instance). It looks like a textbox with the grid icon in the corner. Is this control available for VBA programming? Is it listed/documented anywhere? |
Excel range selection tool/control?
amos -
It's the RefEdit Control, and it's described briefly in VBA Help. - Mike www.mikemiddleton.com ++++++++++++++++++++++++++++ "amos" wrote in message .. . Excel has this nifty range selection (in Page Setup/Sheet or Function Wizard) that allows to select a range with the mouse and the control then shows the selected range ($A$1:$B$3 for instance). It looks like a textbox with the grid icon in the corner. Is this control available for VBA programming? Is it listed/documented anywhere? < |
Excel range selection tool/control?
Make your own... Here is the code. You will need a user form with a text box
in it... Place this code in a sheet and run the sub test... Option Explicit Private Sub Worksheet_SelectionChange(ByVal Target As Range) UserForm1.TextBox1.Value = Target.Address End Sub Sub test() UserForm1.Show False End Sub HTH... "amos" wrote: Excel has this nifty range selection (in Page Setup/Sheet or Function Wizard) that allows to select a range with the mouse and the control then shows the selected range ($A$1:$B$3 for instance). It looks like a textbox with the grid icon in the corner. Is this control available for VBA programming? Is it listed/documented anywhere? |
Excel range selection tool/control?
You could also use the Application.InputBox method.
Set sRange = Application.InputBox(prompt:= _ "Select the range of cells.", Type:=8) Gord Dibben Excel MVP On Tue, 21 Dec 2004 18:44:14 GMT, (amos) wrote: Excel has this nifty range selection (in Page Setup/Sheet or Function Wizard) that allows to select a range with the mouse and the control then shows the selected range ($A$1:$B$3 for instance). It looks like a textbox with the grid icon in the corner. Is this control available for VBA programming? Is it listed/documented anywhere? |
Excel range selection tool/control?
If you do decide to use it, be careful, it can be somewhat flaky. Never
embed it within a frame, it really goes awry then. But it is useful. I think I read a quote from Tushar Mehta somewhere that he doesn't see how a serious developer can avoid using it! -- HTH RP (remove nothere from the email address if mailing direct) "amos" wrote in message .. . Excel has this nifty range selection (in Page Setup/Sheet or Function Wizard) that allows to select a range with the mouse and the control then shows the selected range ($A$1:$B$3 for instance). It looks like a textbox with the grid icon in the corner. Is this control available for VBA programming? Is it listed/documented anywhere? |
All times are GMT +1. The time now is 02:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com