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 6058845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:38:40+00:00 2026-05-23T08:38:40+00:00

I am working on a project and there are about 30 controls that I

  • 0

I am working on a project and there are about 30 controls that I need to call and update at runtime. I have named the controls day0 – day35 (it is a calendar). Basically, at runtime, I need to call each control’s setDate function to display the day number. When I run it, the array just has null/empty.

This is the array I am trying to use in the code behind. The controls are names day0-day35.

Private dateArr() As ucMonthDay = {day0, day1, day2, day3, day4, day5, _
                          day6, day7, day8, day9, _
                          day10, day11, day12, day13, day14, day15, day16, day17, day18, day19, _
                          day20, day21, day22, day23, day24, day25, day26, day27, day28, day29, _
                                  day30, day31, day32, day33, day34}

Then I want to be able to loop through this array and set the date on each of the controls:

    Dim counter As Integer = 0
    While (counter < 35)
        dateArr(counter).setDate(firstDay)
        firstDay.AddDays(1)
        counter += 1
    End While

When this gets called, I get a null pointer exception. I do not understand why the controls are not in the array?

Thanks for your help.

Kevin

  • 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-23T08:38:41+00:00Added an answer on May 23, 2026 at 8:38 am

    You should first create your objects

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

Sidebar

Related Questions

I am working on one project where there is a functionality need to implement
So I'm working on a project where there are tasks that make up a
So I'm working on a project where there are tasks that make up a
I have built a Wpf-ControLibrary-Project to put some Controls there. In one Control i
I have been working on a project which is about data copy from one
I'm working on a project where we need to have data entered or updated
I'm working on problem 9 in Project Euler: There exists exactly one Pythagorean triplet
I am working on a project with OCaml and there are some problems regarding
I'm working on a C++ project in which there are a lot of classes
I am working on a JAVA project in which there are multiple terminals. These

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.