Solved

TabStrips and setting properties of control arrays

Posted on 1998-10-13
5
152 Views
Last Modified: 2010-04-30
I am using a tabstrip in VB4 32bit with an array of picture boxes. On form load I want to set the properties of controls in the picture boxes, eg:

TabStrip1.Tabs(0).picframe.opt1.value = True

but I get an error message which says:

"Index out of bounds"

Can you help?
0
Comment
Question by:ncw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:mcix
ID: 1439793
The Tabstrip is a 1 based collection. Meaning the Tabs Collection starts at 1 not 0.

Try:

TabStrip1.Tabs(1).picframe.opt1.value = True

0
 
LVL 1

Author Comment

by:ncw
ID: 1439794
I realise the index in the tabstrip control's properties starts at 1, but I have seen reference to 'Tabs(0)' in connection with the tabstrip in a help file.

Anyway, I've solved the problem. I was trying to reference a control in a picturebox array on a tab strip. It appears that I do not need to include any reference to the tab strip or picturebox, but can instead reference it as:

FormName.ControlName.Property  - as normal
0
 
LVL 4

Expert Comment

by:mcix
ID: 1439795
Good Deal...


0
 
LVL 1

Author Comment

by:ncw
ID: 1439796
This question is answered. Perhaps someone could explain when the 'TABS(n)' function should be used.
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 50 total points
ID: 1439797
The tabs(n) can be used if you want to set a property of a tab like the name.

tabs(1).Caption = "Tab 1"
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SLMGR Switches Are Not Working On KMS Host 3 142
Visual Studio 2005 text editor 10 48
fso.FolderExists("\\server\HiddenFolder$") 4 88
Excel Automation VBA 19 103
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question