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

  • SEARCH
  • Home
  • 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 6878723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:45:31+00:00 2026-05-27T04:45:31+00:00

I am struggling with a conversion to array in VBA : Dim list As

  • 0

I am struggling with a conversion to array in VBA :

Dim list As Range
Set list = Range(series, series.End(xlDown))
list.Select
Dim table() As Variant
Set table = list.value

My understanding is that value returns an array right ? I don’t get why VBA tells me that I "can't assign to array".

My list range looks like that in Excel at the Select, and i aim at having that as an array so that I can format my dates using something like Format(table.Rows(i).Columns(1).value, "yyyy-mm-dd"), looping on my table.

02-Sep-09   1.00
18-Sep-09   1.00
16-Oct-09   1.00
20-Nov-09   1.00
18-Dec-09   1.00
19-Mar-10   1.00
18-Jun-10   1.00

By the way, is it possible to modify the table in place ?

Thanks !

  • 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-05-27T04:45:31+00:00Added an answer on May 27, 2026 at 4:45 am

    There are a number of problem here.

    Problem 1

    Set table = list.value
    

    table is not an object so you cannot set it. Try:

    table = list.value
    

    Problem 2

    series is a VBA keyword associated with charts. Please pick a name, such as MyWSTable, which means nothing to VBA.

    Problem 3

    A worksheet name is not itself a range. Try:

    Dim Table() As Variant
    Table = Names("MyWSTable").RefersToRange.Value
    

    Note: you do not need variable list nor do you need to select the range.

    Answer to formatting question

    The following code will reformat your dates:

    For inxrow = 1 To UBound(Table, 1)
      For inxcol = 1 To UBound(Table, 2)
        Table(inxrow, 1) = "ddd d mmm yyyyy"
        Table(inxrow, 2) = ""
      Next
    Next
    
    Names("MyWSTable").RefersToRange.NumberFormat = Table
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Struggling with this one. I have set up a basic email/enquiry form for a
Struggling with the following SQL problem. Assume a three dimensional table with entries (h,t,q)
Struggling to set permissions on a listitem... everything appears to be working fine.. no
Struggling with the basics here. I want to setup an array, and fill it
Struggling a bit on this... I'm using crontab for a lot of todo list
I'm struggling with print and unicode conversion. Here is some code executed in the
I am struggling with a Scala implicit conversion problem. The following code snippet illustrates
Struggling with styling the mouse over for a button ... I have managed to
Still struggling to understand what best practices are with respect to macros. I'm attempting
Iam struggling with NHibernate and its lazyload. I have a structure which I simplified

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.