Forms and WorkSheets

  • Thread starter Thread starter Haarish
  • Start date Start date
H

Haarish

Hi All,

I have a user form wherein I set the variable of a global variable
based on the selection of certain radio buttons. Based on the value
chosen I have command buttons selected and deselected in the
worksheet.

But after I hide the form and activate the sheet, the control is not
transferred to the worksheet_activate() method where the functionality
has been handled. Is there something that I am missing?

Thanks in advance,
Haarish.
 
Hello Haarish,

You say "after I hide the form and activate the sheet, the control is not
transferred to the worksheet_activate() " . Is the particular worksheet
already the ActiveSheet. By this I mean the worksheet that you can see when
the Userform is hidden. If so then you might have to do something like this
to fire the Worksheet_Activate event.

'Following code in Userform module.
Private Sub CommandButton1_Click()
Me.Hide 'Hide userform
Sheets("Sheet2").Activate 'Activate another worksheet
Sheets("Sheet1").Activate 'Activate the required worksheet.
End Sub

If the above does not answer your question then perhaps you can share some
of your code.
 
Back
Top