#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default USER input

How do I allow user selection of cells in the middle of a macro?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default USER input

Sub yourmacro()

'some stuff gets done

Set sRange = Application.InputBox(prompt:= _
"Select the range of cells.", Type:=8)

'stuff gets done using sRange

End Sub


Gord Dibben MS Excel MVP


On Tue, 26 Sep 2006 11:53:02 -0700, tgaston
wrote:

How do I allow user selection of cells in the middle of a macro?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default USER input

You can also create a UserForm which could specify specific ranges of cells
that the user would be allowen to select with a check box or radio dial
buttons. The input box cand then be used to allow the user to enter data
into the selected cells.

"Gord Dibben" wrote:

Sub yourmacro()

'some stuff gets done

Set sRange = Application.InputBox(prompt:= _
"Select the range of cells.", Type:=8)

'stuff gets done using sRange

End Sub


Gord Dibben MS Excel MVP


On Tue, 26 Sep 2006 11:53:02 -0700, tgaston
wrote:

How do I allow user selection of cells in the middle of a macro?



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
Prompt user for input and utilize that input ninner Excel Worksheet Functions 2 March 28th 07 09:44 PM
Have user input converted to uppercase in same cell as input? Shannonn New Users to Excel 1 June 20th 06 03:19 AM
User Input The Wonder Thing[_3_] Excel Programming 1 August 19th 04 12:21 AM
CODE to select range based on User Input or Value of Input Field Sandi Gauthier Excel Programming 4 December 8th 03 03:22 PM
Get User Input Gord Dibben[_3_] Excel Programming 0 July 23rd 03 10:48 PM


All times are GMT +1. The time now is 08:46 PM.

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"