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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:46:35+00:00 2026-06-09T00:46:35+00:00

First try Dim holdValues() As Integer ‘Doesn’t Work holdValues(1) = 55 Second try Dim

  • 0

First try

Dim holdValues() As Integer 'Doesn't Work
holdValues(1) = 55

Second try

Dim holdValues(-1) As Integer 'Gives me Index was outside the bounds of the array.
holdValues(1) = 55

I’m trying to do something similar to

 Dim myString(-1) As String

But apparently this doesn’t apply to integer arrays. I don’t know what the size of the array will be, it wont get smaller but it will grow larger.

Any help will be appreciated, 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-09T00:46:37+00:00Added an answer on June 9, 2026 at 12:46 am

    you add the number to

    holdValues(x) //x+1 will be size of array
    

    so something like this

    Dim array(2) As Integer
    array(0) = 100
    array(1) = 10
    array(2) = 1
    

    you can re-allocate the array to be bigger if needed by doing this.

    ReDim array(10) as Integer 
    

    you’ll have to add in your code when you should make your array bigger. You can also look into lists. Lists take care of this issue automatically.

    here’s some info on Lists: http://www.dotnetperls.com/list-vbnet

    Hope this helps.

    Also a link for general knowledge on arrays http://www.dotnetperls.com/array-vbnet

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

Sidebar

Related Questions

My first try of MVC. Am trying to implement a simple example. Inspiration from
New to batch files, first try actually. Trying to make a simple batch file
I've got a pretty strange issue in my first try of using Entity Framework
First I will try to explain what I want to do. The app loads
so I wanted to try my first CLR project in Visual C++. So I
it s the first time i try this page. I ve just installed imagemagick
first I'm gonna try to explain what exactly I want to do: I have
I try to create styles with first-child and last-child items but I encountered a
I try to do some treatment when a NSComboBox looses first responder status, and
First I unplug my network cable. Then I try to connect to SQL Server

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.