Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 09-02-2016, 05:34 AM
p45cal's Avatar
p45cal p45cal is offline InputBox selects rows Windows 10 InputBox selects rows Office 2010 32bit
Expert
 
Join Date: Apr 2014
Posts: 962
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Without row and column restrictions, try adapting NoSparks' code:
Code:
Sub blah()
On Error Resume Next
Set PickedRng = Application.InputBox("Use mouse to select", "TITLE HERE", Type:=8)
Intersect(PickedRng.EntireRow, Range("A:K")).Select
End Sub
NoSparks, note what happens with your code when a single cell is selected…

However, the OP did say "if a user selects a range of cells in any column between A to K" so perhaps:
Code:
Sub blah2()
Set MainRng = Range("A:K")
On Error Resume Next
Set PickedRng = Application.InputBox("Use mouse to select", "TITLE HERE", Type:=8)
If Application.Intersect(PickedRng, MainRng) Is Nothing Then
  MsgBox "Something within columns A to K please"
  Cells(1).Select
  Exit Sub
End If
Intersect(PickedRng.EntireRow, Range("A:K")).Select
End Sub'
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
InputBox selects rows 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
InputBox selects rows 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
InputBox selects rows Cannot select single characters. Word selects paragraphs or parts of sentences. TMinnich Word 2 10-25-2013 09:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:11 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft