Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm looking for an instruction to be used into a macro which gives the
possibility to interrupt the macro until you select a group of cells with the mouse. Then the macro has to perform some operations on the selected cells. I tried with InputBox but it does not permit to select a range of cells with the mouse, you can only write it with the keyboard, for example: "a1:a10". Could you suggest me something about this problem? I would like some windows like the ones you use when you select data for a graphic. Thank you. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
use Application.Inputbox
with the Type parameter set to 8 , range. read help on this, its reasonable good Patrick Molloy Microsoft Excel MVP -----Original Message----- I'm looking for an instruction to be used into a macro which gives the possibility to interrupt the macro until you select a group of cells with the mouse. Then the macro has to perform some operations on the selected cells. I tried with InputBox but it does not permit to select a range of cells with the mouse, you can only write it with the keyboard, for example: "a1:a10". Could you suggest me something about this problem? I would like some windows like the ones you use when you select data for a graphic. Thank you. . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Max,
You need Application.Inputbox. If you use this with a type of 8 you can select a range of cells, and the address of these cells is returned to Inputbox. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Max_Venezia" wrote in message om... I'm looking for an instruction to be used into a macro which gives the possibility to interrupt the macro until you select a group of cells with the mouse. Then the macro has to perform some operations on the selected cells. I tried with InputBox but it does not permit to select a range of cells with the mouse, you can only write it with the keyboard, for example: "a1:a10". Could you suggest me something about this problem? I would like some windows like the ones you use when you select data for a graphic. Thank you. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Max,
Try something like the following code: Dim SelectedRange As Range On Error Resume Next Set SelectedRange = Application.InputBox( _ prompt:="Select A Range", Type:=8) If SelectedRange Is Nothing Then MsgBox "You clicked cancel" Else MsgBox "You selected: " & SelectedRange.Address End If On Error GoTo 0 -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Max_Venezia" wrote in message om... I'm looking for an instruction to be used into a macro which gives the possibility to interrupt the macro until you select a group of cells with the mouse. Then the macro has to perform some operations on the selected cells. I tried with InputBox but it does not permit to select a range of cells with the mouse, you can only write it with the keyboard, for example: "a1:a10". Could you suggest me something about this problem? I would like some windows like the ones you use when you select data for a graphic. Thank you. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Max,
I would have the InputBox use a default of the activecell or the current selection. See webpage: InputBox and MsgBox http://www.mvps.org/dmcritchie/excel/inputbox.htm and the specific example: Multiple Range Selection in InputBox (#multi) http://www.mvps.org/dmcritchie/excel/inputbox.htm#multi --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Match a group of cells with another group of cells | Excel Worksheet Functions | |||
Copy Data from One Group of Cells to Another Group | Charts and Charting in Excel | |||
from a group of cells.find average of cells containing values | Excel Discussion (Misc queries) | |||
How do I name a group of cells? | Excel Discussion (Misc queries) | |||
copy group of cells to another group of cells using "IF" in third | Excel Worksheet Functions |