ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   selecting range as input in VBA (https://www.excelbanter.com/excel-programming/434742-selecting-range-input-vba.html)

moshe_xls

selecting range as input in VBA
 
Hi,

I'm looking for VBA function (or script) that allows me to select range
(with mouse) as input (like the Excel SUM function for example).

Thanks


Mike H

selecting range as input in VBA
 
Hi,

Do you mean this

Set myrange = Application.InputBox(Prompt:="Please select range", _
Title:="Range Selector", Type:=8)

MsgBox "You selected " & myrange.Address

Mike

"moshe_xls" wrote:

Hi,

I'm looking for VBA function (or script) that allows me to select range
(with mouse) as input (like the Excel SUM function for example).

Thanks


moshe_xls

selecting range as input in VBA
 
Thanks,

This is exactly what I looked for :)


"moshe_xls" wrote:

Hi,

I'm looking for VBA function (or script) that allows me to select range
(with mouse) as input (like the Excel SUM function for example).

Thanks



All times are GMT +1. The time now is 10:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com