Suppose you have a multipage with n pages. In each page there are some textboxes.
Is it possible to get the page number where one specific textbox lies?
Printable View
Suppose you have a multipage with n pages. In each page there are some textboxes.
Is it possible to get the page number where one specific textbox lies?
If this is resolved, please post your resoultion as it may help someone else with the same or similiar problem.
I called the n pages of the multipage mpgMap as follows: pg1, pg2, pg3,..., pg8
The number of every page is the same as the mpgMap.Value, then in order to locate the controls I use the following code
Ps. I can't get this thing to format the codevb Code:
Sub Check() Dim c As Control Dim origin as Integer For Each c in mpgMapa.Controls 'Checks if the textboxes in the multipage contain only numbers If Left(c.Name,6) = "txtBox" And IsNumeric(c) = False Then 'Pops up a warning message msgbox "You must fill the case with numbers", "ERROR" 'Get the number of the page where the textbox lies origin = Right(c.parent.Name,1) 'Activate the page mpgMap.Value = origin 'Activate the textbox c.SetFocus Next End Sub
There are two ways to format your code (I edited you previous post and add highlight tags, which is one way.)Quote:
Originally Posted by Fonty
The two ways are using either [highlight=vb]your code goes in here[/highlight]
Or
[code]your code goes here[/code]
The code tags are more used as the code is more easily copied by other members than code surrounded by the highlight tags.