473,396 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

changing value of index1

This piece of code

Expand|Select|Wrap|Line Numbers
  1. If index1 < 1323 Then
  2. index1 = index1 + 1
  3. Else
  4. 'MsgBox "This is the last record of the data"
  5. Label1.Caption = line_value1(index1)     
  6. End If
  7.  
works fine as long as I don't change the value of index1.
As soon as I insert index1=50 then it doesn't work right.
It worked fine in vb6 but not in vb.net. Any ideas why it doesn't work.

Thanx
Sep 17 '07 #1
4 1039
Shashi Sadasivan
1,435 Expert 1GB
If its not working, did it give you any exceptions?
Please provide that (im not a vb programmer, but can figure out certain things based on exceptions)

cheers
Sep 17 '07 #2
I meant it doesn't work as it should. The label will display the line_value at line #10, but doesn't move to the next line as in the original where it keeps going till the end of the data. Consequently there are no exceptions.
Sep 17 '07 #3
Shashi Sadasivan
1,435 Expert 1GB
All I can figure out that you might be doing some VB type code in there.
Apparantly VB .Net is different from VB, So other who are more proficient with it and its differences might be able to help out.

Cheers
Sep 17 '07 #4
I am wondering if index1 is set as 1 by default in vb.net and cannot be changed this way. All I am trying to do is, by using a command button or a timer, display the data sequentially, one line at a time.But I want to be able to control the start and end points in the data. Thanks for your attempt at helping out.
Sep 17 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: M Wells | last post by:
Hi All, Just wondering how you go about changing the value of a session cookie via javascript? I have a PHP page that sets a session cookie when it first loads. I'd like to be able to change...
2
by: Urs Vogel | last post by:
Hi When using XmlDocument, I can create nodes and attributes as I like. What I didn't achieve is changing the Value of a node (created with createElement), it claims that it's the wrong node...
4
by: David Coffin | last post by:
I'd like to subclass int to support list access, treating the integer as if it were a list of bits. Assigning bits to particular indices involves changing the value of the integer itself, but...
12
by: GaryDean | last post by:
In the original post I failed so indicate that I am using framework 1.1....... I need to be able to change the background color of a page from code. I found an answer to this question in...
4
by: andychambers2002 | last post by:
I'm working on a "TempFile" class that stores the data in memory until it gets larger than a specified threshold (as per PEP 42). Whilst trying to implement it, I've come across some strange...
0
by: ashoksharma2621 | last post by:
I'm using Xerces-J-2.6.2 it barks at me with org.xml.sax.SAXParseException: InvalidRegex: Pattern value '?(\d+|\d+(\.\d+)?%)(,\s*?(\d+|\d+(\.\d+)?%))*' is not a valid regular expression. The...
3
by: =?Utf-8?B?R0I=?= | last post by:
I have created a small program that illustrates the problem. I would know how to address the fields that I want to sort on in the greaterThan comparison. Anybody who knows?? using System; ...
2
by: samonline | last post by:
Dear friends, I have written a little program to read the source of a web page into a Rich Text Box. Now I want to find a specific integer value in that text box and take it into a variable. That...
1
by: zoeb | last post by:
Currently I have a table, and would like the calculate a field in the table by referencing values from another 3 tables. i.e. tblData Index1, Index2, Index3, Value 1 2 3 2...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.