473,480 Members | 1,922 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Tab Focus

25 New Member
How do you change the tab page of a TabCtlBox using VB so that it has focus?

I have an excel object on one of the pages but due to a function I have written to update the excel object, it will also move focus to the page this excel object is on. I have tried disabling the control whilst the update function is used: ie:

MyTabCtl.enabled = false

but then it returns an error, presumably because it cant then move focus to the excel object on its page.

The TabIndex just seems to return a value of the current page.

ie

MyTabCtl.TabIndex = 0
Feb 21 '08 #1
2 2689
mshmyob
904 Recognized Expert Contributor
Are you looking for?

Expand|Select|Wrap|Line Numbers
  1. Me.ctlPageName.setfocus
  2.  
Where ctlPageName = the tab control PAGE name.

How do you change the tab page of a TabCtlBox using VB so that it has focus?

I have an excel object on one of the pages but due to a function I have written to update the excel object, it will also move focus to the page this excel object is on. I have tried disabling the control whilst the update function is used: ie:

MyTabCtl.enabled = false

but then it returns an error, presumably because it cant then move focus to the excel object on its page.

The TabIndex just seems to return a value of the current page.

ie

MyTabCtl.TabIndex = 0
Feb 21 '08 #2
FishVal
2,653 Recognized Expert Specialist
How do you change the tab page of a TabCtlBox using VB so that it has focus?

I have an excel object on one of the pages but due to a function I have written to update the excel object, it will also move focus to the page this excel object is on. I have tried disabling the control whilst the update function is used: ie:

MyTabCtl.enabled = false

but then it returns an error, presumably because it cant then move focus to the excel object on its page.

The TabIndex just seems to return a value of the current page.

ie

MyTabCtl.TabIndex = 0
Do you mention tabcontrol in Access or in Excel. They are somewhat different.
Access has it own tabcontrol while Excel uses one from MSForms library.

Regards.
Fish
Feb 21 '08 #3

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

Similar topics

4
2198
by: Nitin | last post by:
Hi I have created function to check date and time. at the time of execution, if date is left empty the function returns the error message but then the focus goes to next field. Next filed is for...
2
3071
by: Peter Wright | last post by:
Hi all. Hopefully this should demonstrate the problem I'm having: http://flooble.net/~pete/focus-problem-demo/ (I'm testing it in Mozilla only, but I'm not sure if it's actually a...
3
6870
by: VA | last post by:
t=document.getElementById('mytable') is a HTML table with some input fields in its cells Why doesnt t.getElementsByTagName('tr').firstChild.focus; put the focus on that text field? It...
17
3815
by: Neil Ginsberg | last post by:
OK, this is a stupid thing, but I can't seem to get this to work. I have a form with a subform (in continuous form view). A combo box on the main form has code in the AfterUpdate event which adds a...
1
2221
by: avnrao | last post by:
Hi, I am facing a problem with control.focus (javascript). Here is the description of the issue. 1. I have 2 aspx files. on Aspx1 I have button named NewRow. Clicking on this, will redirect...
4
3922
by: SJ | last post by:
Hi all, I have come across a weird problem when attempting to automatically set the focus in a vb.net form to a checkbox control... In my form I have (on a tab page in a tab control) several...
11
7317
by: Alex.Svetos | last post by:
Hello, I'm trying to get a popup to keep focus when it is re-clicked. The script below is supposed to produce this exact behaviour, however it doesn't work, at least on firefox 1.0.7 and moz...
7
11897
by: Dave Booker | last post by:
I am using a WebBrowser object in my .NET 2.0 application, but it is not shown to the user. Every time a timer event triggers it to perform a m_WebBrowser.Navigate() I get that classic IE 'click'...
4
67958
by: Roger | last post by:
Hi, I am confused about the differences between this.window.focus(), window.focus(), and this.focus(). I want to use the calls in a <body onload="..."tag. What are the differences between...
3
5177
by: jp2express | last post by:
I have several applications that use panels as screens, but I can *not* seem to set the focus for a Textbox. Panel1.BringToFront() Panel1_Textbox.Focus() ' do something with a control on Panel1...
0
7037
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
6904
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
7032
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
7076
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...
1
6730
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4471
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2990
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
174
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.