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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:40:24+00:00 2026-05-27T00:40:24+00:00

I tried the following : (VB.Net code) Dim data As Object Dim range As

  • 0

I tried the following : (VB.Net code)

Dim data As Object
Dim range As Excel.Range
range = WB.Sheets("mysheet").Range("A1:C5")
data = range.Value   ' Here WB is the Wrokbook object
' Until here its working fine.
' During Debug: I can see data with values for [ (0,0), (0,1), (0,2), (1,0), .. ]
' Now following line gives an exception !!
Dim val = data(0,0)  ' Index out of range exception.

How can I iterate the so called RangeValueDataType object like an array ?

Reference: http://msdn.microsoft.com/en-us/library/bb238606(v=office.12).aspx

  • 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-27T00:40:24+00:00Added an answer on May 27, 2026 at 12:40 am

    AFIAK Excel Range data is array with 1 base index, i.e. first item will be data(1, 1).

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

Sidebar

Related Questions

Anything I have tried didn't work. Currenly I have following code to change asp.net
i have tried the following code in net beans i am expecting error but
I tried to create this by following the video at http://www.asp.net/learn/videos/video-7026.aspx where Joe Stagner
Tried following the instructions here: How to use Google app engine with my own
I tried the following code in LINQPad and got the results given below: List<string>
Here is the ASP.Net MVC2 code that I use to display a textbox input.
I have the following in a program (written in VB.NET): Imports Microsoft.Office.Interop.Excel Public Class
I have the following query in ASP.NET/C# code which is failing to return any
I am trying to send an email through following code CODE Dim MyMailMessage As
I've been having trouble converting the following fairly straight forward c# code into vb.net

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.