Forms and WorkSheets

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.
 
O

OssieMac

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top