Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9182301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:31:40+00:00 2026-06-17T18:31:40+00:00

In VBA (Excel 2010), I am dynamically creating a named range list using that

  • 0

In VBA (Excel 2010), I am

  1. dynamically creating a named range list
  2. using that list to create drop down choices in another column

When creating the drop down list, (a) using the named range doesn’t seem to work, and (b) if I don’t use the named range – and need to reference by sheet name and cell reference, I get into trouble because my sheet has just been renamed with today’s date.

This is messy, I know, but here is what I have so far:

' find the name of the worksheet and replace it with today's date
Dim vTabOriginalName As String
Dim vTabDateName As String

Dim vRangeName As String

vRangeName = "StageListChoices"

vTabOriginalName = ActiveSheet.Name
vTabDateName = Format(Now(), "yyyy-mmm-dd")
ActiveSheet.Name = vTabDateName

'create a drop down list for the stage (col K)

Range("AK3").Value = "NO ACTIVITY"
Range("AK4").Value = "SOLICITATION"
Range("AK5").Value = "OPPORTUNITY"

ActiveWorkbook.Names.Add Name:="StageListChoices", RefersToR1C1:=(vTabDateName & "!R3C37:R5C37")


'~~> Creates the list
With Range("K2:K" & vReportRowCount).Validation  'report row count known earlier
    .Delete
    .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="=StageListChoices"  
    .IgnoreBlank = True
    .InCellDropdown = True
    .InputTitle = ""
    .ErrorTitle = ""
    .InputMessage = ""
    .ErrorMessage = ""
    .ShowInput = True
    .ShowError = True
End With

The recorded macro when I created the named region made sense enough:

ActiveWorkbook.Names.Add Name:="StageListChoices", RefersToR1C1:= _
    "=2013-JAN-24!R3C37:R14C37"
ActiveWorkbook.Names("StageListChoices").Comment = ""

Originally, I had been creating the drop down in VBA with a String variable, but the “real” list is 15 items long and I was getting errors upon reopening the file that the validation had been too long (?) and so had been turned off.

Basically, I’ve tried things like:

Formula1:="=StageListChoices"

Formula1:=vRangeName

Formula1:="=vRangeName"

Formula1:=vTabDateName & "!R3C37:R5C37"

Everything I’ve looked up says that the first one (Formula1:=”=StageListChoices”) should have worked – but it doesn’t.

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:31:41+00:00Added an answer on June 17, 2026 at 6:31 pm

    Change

    ActiveWorkbook.Names.Add Name:="StageListChoices", RefersToR1C1:=(vTabDateName & "!R3C37:R5C37")

    to

    ActiveWorkbook.Names.Add Name:="StageListChoices", RefersToR1C1:=("='" & vTabDateName & "'!R3C37:R5C37")

    You were missing the = and the '

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I create an Outlook 2010 object In Excel VBA using Sub CreateOL() On
I have a vba function in excel 2010 that I built using help from
I'm using Excel 2010. I have some code in background (VBA) that is growing
I am using Excel VBA 2003. Is it possible to create new recordset by
I am using VBA for Excel 2010 and randomly receiving the following error: Run-time
I'm using xmlhttp via vba in excel 2010. I need to programmatically add an
I'm using this web scraping VBA code in Excel 2010 to pull the title
I am trying to create a macro in excel 2010 that finds every cell
Is there there any code in Excel 2010 VBA that I can use to
Im looking for a way to do this in Excel 2010 using VBA. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.