Solved

Setting Focus to a tab on Form Activate

Posted on 2004-09-29
9
476 Views
Last Modified: 2008-01-09
How can I set the focus to a tab on a form on the activate command?  Thanks all
0
Comment
Question by:sbornstein2
[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
9 Comments
 
LVL 8

Expert Comment

by:mladenovicz
ID: 12181937
SSTab1.SetFocus
0
 
LVL 19

Expert Comment

by:Shauli
ID: 12181950
If you refer to the SSTAB (Tabed Dialog) then:

Private Sub Form_Activate()
SSTab1.Tab = 1   'or any other number, The number is the tab number you want to set focus on.
End Sub

S
0
 

Author Comment

by:sbornstein2
ID: 12182614
I am using VBA actually and I dont have the tab property.  I have a tab called MultiPage1 and the tab name is Page1.  My options under MultiPage1. are

pages
tabindex
etc.

I tried MultiPage1.TabIndex = 1 but no dice it still goes to another tab.
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 19

Expert Comment

by:Shauli
ID: 12182636
I'm guessing here, but try:

Page1.Pages(1)

Where 1 is the tab number.

Let us know.

S
0
 
LVL 19

Expert Comment

by:Shauli
ID: 12182664
Or maybe Page1.Pages = 1

But I'm unfamiliar with that vba tab.

S

0
 

Author Comment

by:sbornstein2
ID: 12183701
No dice.
0
 
LVL 19

Expert Comment

by:Shauli
ID: 12183804
In that case I suggest you ask for refund @ customer support, and replace the question, and this times specifying its VBA and Multipage control. :)

Good luck,

S
0
 
LVL 12

Accepted Solution

by:
jkaios earned 20 total points
ID: 12187367
How about try these other combinations ...

MultiPage1(0).SetFocus
 - or -
MultiPage1.Pages(0).SetFocus
 - or -
MultiPage1.TabIndex = 0
 - or -
MultiPage1.TabIndex(0).SetFocus

Remember that some Collections start with Index = 0, usually "Controls" collections.
0
 

Author Comment

by:sbornstein2
ID: 12190152
The answer is just .Value in VBA.  MultiPage.Value = 1
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

734 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