![]() |
|
#2
|
|||
|
|||
|
Maybe something along the lines of this
Code:
Sub Testing()
Dim MainRng As Range
Dim PickedRng As Range
Dim arr As Variant
Set MainRng = Range("A10:K20")
On Error Resume Next
Set PickedRng = Application.InputBox("Use mouse to select", "TITLE HERE", Type:=8)
On Error GoTo 0
If PickedRng Is Nothing Then Exit Sub
If Application.Intersect(PickedRng, MainRng) Is Nothing Then
MsgBox "Something within rows 10 to 20 please"
Cells(1).Select
Exit Sub
End If
Set PickedRng = Application.Intersect(PickedRng, MainRng)
arr = Split(Replace(Mid(PickedRng.Address, 2), ":", ""), "$")
Range("A" & arr(1) & ":K" & arr(3)).Select
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
MS Word 2010 Table Selector Selects Header On One Page and Rows On Next Page
|
scptech | Word Tables | 4 | 01-11-2016 02:55 PM |
| VBA Macro for word with Inputbox | ryanch69 | Word VBA | 2 | 12-03-2015 07:45 AM |
Idiot Proof Entry with InputBox
|
arpirnat | Word VBA | 1 | 04-27-2015 10:03 PM |
| Is there a way to change how Excel auto selects where it pulls data? | PStark | Excel | 0 | 12-30-2014 09:28 AM |
Cannot select single characters. Word selects paragraphs or parts of sentences.
|
TMinnich | Word | 2 | 10-25-2013 09:38 AM |