Both examples should work. What lines are causing the errors and what are the exact messages.

Also, what version of VB are you using ?

In my example, you would have to fill in a true or false for each tab. In bushmoble's you would only need one.