?
Solved

Range Name With Text Box Input

Posted on 2014-04-07
2
Medium Priority
?
309 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 39

Accepted Solution

by:
nutsch earned 1500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

765 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