Solved

Range Name With Text Box Input

Posted on 2014-04-07
2
281 Views
Last Modified: 2014-04-07
How do you construct an Excel 2010 macro to name range (A3) using data from a text box,  SBINumberTextBox.Text, and concatenate it with some standard text, i.e. ProjectName?
0
Comment
Question by:cowboywm
2 Comments
 
LVL 39

Accepted Solution

by:
nutsch earned 500 total points
ID: 39983810
Often, if you record a macro doing what you're trying to do, you will get most of the elements for the answer.

The following code will add a workbook-level name called ProjectName" & SBINumberTextBox.Text, referring to A3 of sheet 1.

ActiveWorkbook.Names.Add Name:= "ProjectName" & SBINumberTextBox.Text, RefersToR1C1:="=Sheet1!R3C1"

Thomas
0
 

Author Closing Comment

by:cowboywm
ID: 39984737
Thank you.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

822 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question