Hi everyone,
I have this program where I am using a special Active X control to do the scrolling of items on each form. I really don't want to go through the repetition of Select Case structures in order to do the scrolling so what I am doing is that I have this variable called frmForm and it is declared as var type Form. I am trying to assign the Form names of the different forms to store the name of the current form. Its like this:

VB Code:
  1. ' In a seperate module
  2. Public frmForm As Form
  3.  
  4. ' When the main form loads
  5. Private Form_Load()
  6.       frmForm = frmMain
  7. End Sub
  8.  
  9. ' In The Active X Control
  10. Private Sub UserControl1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  11.     frmForm.lblComponent(0).BackColor = vbBlue
  12. End Sub

Here I get a "Type Mismatch" Error when in the line frmForm = frmMain

Is there any way to help me out here...? Anyone..?

Any help would be appreciated