![]() |
User sets range
I need a routine that does the following:
1. MsgBox tells user to define a range by highlighting an area. 2. User clicks OK when done highlighting. 3. VBA saves and names the range. Can someone steer me in the right direction? |
User sets range
Arts
a very basic example, but somewhere to start: Sub SelectRange() Dim myRange As Range Set myRange = Application.InputBox("Please select a range", _ "Range Selection", _ Range("A1:B2").Address, , , , , _ 8) myRange.Select End Sub Regards Trevor " wrote in message ... I need a routine that does the following: 1. MsgBox tells user to define a range by highlighting an area. 2. User clicks OK when done highlighting. 3. VBA saves and names the range. Can someone steer me in the right direction? |
Trevor, thx for quick resp (eom)
-----Original Message----- Arts a very basic example, but somewhere to start: Sub SelectRange() Dim myRange As Range Set myRange = Application.InputBox("Please select a range", _ "Range Selection", _ Range("A1:B2").Address, , , , , _ 8) myRange.Select End Sub Regards Trevor " wrote in message ... I need a routine that does the following: 1. MsgBox tells user to define a range by highlighting an area. 2. User clicks OK when done highlighting. 3. VBA saves and names the range. Can someone steer me in the right direction? . |
All times are GMT +1. The time now is 12:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com