Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
If a user select's a range say A1:A10 then the macro should run. But if a user select's multipul range say A1:A5 & A8:A10 then it should give a msgbox. My intension that the user should only select the range which is in sequenc...... I tried to work with ActiveWindow.RangeSelection.Address but could not find a way to find out a way. Regards Heera |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Look at Areas.Count
Mike F "Heera" wrote in message ... Hi, If a user select's a range say A1:A10 then the macro should run. But if a user select's multipul range say A1:A5 & A8:A10 then it should give a msgbox. My intension that the user should only select the range which is in sequenc...... I tried to work with ActiveWindow.RangeSelection.Address but could not find a way to find out a way. Regards Heera |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this
Set MyRange = Selection If MyRange.Areas.Count 1 Then MsgBox ("Move thean one area selected") End If "Heera" wrote: Hi, If a user select's a range say A1:A10 then the macro should run. But if a user select's multipul range say A1:A5 & A8:A10 then it should give a msgbox. My intension that the user should only select the range which is in sequenc...... I tried to work with ActiveWindow.RangeSelection.Address but could not find a way to find out a way. Regards Heera |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Joel
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I enter formula sum(range+range)*0.15 sumif(range=3) | Excel Discussion (Misc queries) | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
Range Question / error 1004: method Range of object Worksheet has failed | Excel Programming | |||
Range.Find returns cell outside of range when range set to single cell | Excel Programming | |||
how to? set my range= my UDF argument (range vs. value in range) [advanced?] | Excel Programming |