ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Heres the proble... (https://www.excelbanter.com/excel-programming/284422-re-heres-proble.html)

[email protected]

Heres the proble...
 
This will open an InputBox and allow them to select a range, rather
than typing the range in the InputBox.

Sub SelectRange()
Dim rngR As Range

On Error Resume Next
Set rngR = Application.InputBox(Prompt:="Select a range.", _
Type:=8)
If rngR Is Nothing Then MsgBox "Did you select a range?"
On Error GoTo 0
rngR.Select
End Sub

Tested using Excel 97SR2 on Windows 98SE,

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------

I need to open an uinput box that should ask the user to type in a range.
When the user types the range and clicls a button the range shoud appear
selected. How difficult is this??




All times are GMT +1. The time now is 03:55 AM.

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