View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
tmort[_8_] tmort[_8_] is offline
external usenet poster
 
Posts: 1
Default Tabbed form problem


I have a multitab form which I have the user step through to ente
data.

when going from one tab to the next I am checking to see that data ha
been entered into the controls for the previous tab.

the code is:

Private Sub MaterialValCheck()
If TxName.Text = "" Then
Beep
MsgBox "Material name must be filled in"
tabs.Value = tabs.Value - 1

curstep = "Material"

Exit Sub
End If

The message appears and afer OK is selected, the previous ta
(tabs.value - 1) is highlighted however all of the controls and tex
that appear on the form are from the tab I am going back from, not th
one I just set the tab value to and that is hightlighted.

It does this if I use

Private Sub MaterialValCheck()
If TxName.Text = "" Then
Beep
MsgBox "Material name must be filled in"
tabs.Value = 1

curstep = "Material"

Exit Sub
End If

When I want to go back from tabs.value = 2 as well.

I'm not sure how well I explained this but any help would b
appreciated. Thanks in advance

--
tmor
-----------------------------------------------------------------------
tmort's Profile: http://www.excelforum.com/member.php...fo&userid=2105
View this thread: http://www.excelforum.com/showthread.php?threadid=39035