Error when compiling - Totaly Lost !!!!!

Hi guys.

I have a form, with a tool bar at the top
File, Edit etc etc

When I compile I get a few errors.
Not sure what they mean, and how to get rid of them.
I followed the instructions from my book ( wrox, Beginning VB.NET )

Attached is a copy of the screenshot I took to show the errors.

Thanks in advance for any help given

Best Wishes
Max

http://www.auxi59.dsl.pipex.com/diagram2.jpg

Below, Code for the menus....



PrivateSub ExitToolStripMenuItem_Click(ByVal senderAs System.Object,ByVal eAs System.EventArgs)Handles ExitToolStripMenuItem.Click
Me.Close()
EndSub

PrivateSub CutToolStripMenuItem_Click(ByVal senderAs System.Object,ByVal eAs System.EventArgs)Handles CutToolStripMenuItem.Click
Dim objTextBoxAs TextBox =Me.ActiveControl
objTextBox.Cut()
EndSub


PrivateSub CopyToolStripMenuItem_Click(ByVal senderAs System.Object,ByVal eAs System.EventArgs)Handles CopyToolStripMenuItem.Click
Dim objTextBoxAs TextBox =Me.ActiveControl
objTextBox.Copy()
EndSub

PrivateSub PasteToolStripMenuItem_Click(ByVal senderAs System.Object,ByVal eAs System.EventArgs)Handles PasteToolStripMenuItem.Click
Dim objTextBoxAs TextBox =Me.ActiveControl
objTextBox.Paste()
EndSub

PrivateSub UndoToolStripMenuItem_Click(ByVal senderAs System.Object,ByVal eAs System.EventArgs)Handles UndoToolStripMenuItem.Click
Dim objTextBoxAs TextBox =Me.ActiveControl
objTextBox.Undo()
EndSub


--
Access 2003 ( For Data Sets Backend )
Visual Studio 2005 Beta 2
Crystal Reports Pro v10
Windows XP SP2
Total programming Beginner - Using .Net as first language !!!!

MSN ID: max_nvision[remove this]@yahoo.co.uk

[3882 byte] By [MaxVernon] at [2007-12-16]
# 1

Because the "tab control" is the active control on the form you can not make it a "textbox" ->Dim objTextBox As TextBox = Me.ActiveControl

If you have more than a single textbox that this code applies to ..you may want to consider using a flag or enumeration to tell which textbox you were last in...as the error emplies the active control does not neccesarily have to be what you think it is!

DMan1 at 2007-9-9 > top of Msdn Tech,Windows Forms,Windows Forms General...