Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Placing Objects Dynamacically in SSTAB

Posted on 2003-02-26
3
Medium Priority
?
238 Views
Last Modified: 2010-04-07
IN My Form i already have SSTab Control. In First Tab Place I Have on CheckBox Control Named as chksub(0)

In Second TabSpace I Have another Check Box Chksub1(0).

If i use the Following Code, I can able to Load One More Check Boxes In Both First and Second Tab.

The Problem is, If The Second Tab is Visible Second ChekBox Named as "ASo" is Visible But Another Checkbox which having caption "Asok" Disappeard. This Problem Vice versa for First Tab also.

Can Anyone Help Me?


private sub cmdload_click()

Load chkSub(1)
chkSub(1).Caption = "Asok"
chkSub(1).Top = chkSub(0).Top + 400
chkSub(1).Left = chkSub(0).Left
chkSub(1).Visible = True
chkSub(1).Container = SSTab1

Load chkSub1(1)
chkSub1(1).Caption = "Aso"
chkSub1(1).Top = chkSub1(0).Top + 400
chkSub1(1).Left = chkSub1(0).Left
chkSub1(1).Visible = True

End sub
0
Comment
Question by:sazhagianambi
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
deighton earned 200 total points
ID: 8024390
here's an example

Dim lTab As Long

lTab = SSTab1.Tab

SSTab1.Tab = 0
Load Check1(1)
Check1(1).Visible = True
Check1(1).Top = Check1(0).Top + 300


SSTab1.Tab = 1
Load Check2(1)
Check2(1).Visible = True
Check2(1).Top = Check2(0).Top + 300

SSTab1.Tab = lTab
0
 
LVL 1

Author Comment

by:sazhagianambi
ID: 8024488
Hi Friend,

Thank You Mr.Deighton. Your Example Works Very Fine. I Just Tried Sstab1.index=0 Statement after Load ChkSub(1). So I can't able to Get the Proper Result. Thanks

Regards,
Nambi
0
 
LVL 1

Author Comment

by:sazhagianambi
ID: 8031712
Hi,

Deightons Suggestion Works Prefectly When i Call This Function From Command_Click Event. If i call this Function From The Combo_click Event then the Problem Occurs As i Mentioned Earlier. Plz Help Me Regarding This. Is Any way to Make this Possible in Click Event.

Dim lTab As Long
lTab = SSTab1.Tab

SSTab1.Tab = 0
Load Check1(1)
Check1(1).Visible = True
Check1(1).Top = Check1(0).Top + 300


SSTab1.Tab = 1
Load Check2(1)
Check2(1).Visible = True
Check2(1).Top = Check2(0).Top + 300

SSTab1.Tab = lTab


Regards,
Nambi
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month12 days, 3 hours left to enroll

564 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