Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Select worksheet from UserForm

  Asked By: Bonni    Date: Feb 26    Category: MS Office    Views: 1858
  

New at using VBA, so a VERY basic question, I'm sure. I have a
workbook with six different worksheets, each for different types of
calculations. I have a userform show when the workbook is opened with
option buttons for each worksheet. What is the VBA code to go to the
respective worksheet when a button is chosen?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Meenakshi Khochar     Answered On: Feb 26

Private Sub OptionButton1_Click()
Worksheets(1).Activate
End Sub


Private Sub OptionButton2_Click()
Worksheets(2).Activate
End Sub

 
Didn't find what you were looking for? Find more on Select worksheet from UserForm Or get search suggestion and latest updates.




Tagged: