Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default 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??


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Heres my macro code... JSHARP92 New Users to Excel 1 March 10th 11 12:01 PM
Proble with using match function Montu Excel Worksheet Functions 3 December 28th 07 10:32 AM
Import/Export Proble. Urgent axissm Excel Discussion (Misc queries) 1 February 19th 06 06:46 PM
Heres the proble... KajBre Excel Programming 0 December 4th 03 02:52 PM
heres one for ya.. alan_bourne[_13_] Excel Programming 6 November 14th 03 02:54 PM


All times are GMT +1. The time now is 05:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"