Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Use Input Box to Name Adjacent Ranges

Whoever will help:

I have some code that goes to the first empty range on a given row and
then pastes in a template. It then askes the user via an input box
what to name the template (which is serving to store scenario values
possibly exceeding the number the scenario manager can handle).

Here is the code so far:

Sub AddVoiceScenario()

Dim NewVoice As String



Sheets("Voice Capture").Select
Range("B4:C48").Select
Selection.Copy

Sheets("Scenarios").Select
Range("B10").Select

Do While ActiveCell.Value = "Current"

ActiveCell.Offset(0, 3).Select

Loop

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False


NameScenario:

On Error GoTo Handler
NewVoice = InputBox("Please enter a name for this scenario. (The
name may include underscores but no spaces.)")



At this point I want the range where the paste operation just occurred
to be named whatever the user entered into the InputBox (i.e., name
the range the current value of "NewVoice").

Thanks to anyone who can help.

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
how can I print non-adjacent ranges on one page steve Excel Discussion (Misc queries) 2 April 5th 06 04:36 PM
How do I add input data in the input ranges in drop down boxes. oil_driller Excel Discussion (Misc queries) 1 November 9th 05 10:31 PM
union method for non-adjacent ranges Dana DeLouis[_5_] Excel Programming 0 September 16th 03 03:29 PM
union method for non-adjacent ranges Tom Ogilvy Excel Programming 0 September 16th 03 02:21 PM
union method for non-adjacent ranges Jim Rech Excel Programming 0 September 16th 03 02:17 PM


All times are GMT +1. The time now is 03:55 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"