Solved

Range Name With Text Box Input

Posted on 2014-04-07
2
274 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
Comment Utility
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
Comment Utility
Thank you.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now