Can I Duplicate a sheet/new name for sheet/hide certian columns with a userform?

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Well if anyone was paying attention or cared about this post here is what I did and seems to work out

Code:
Private Sub shtCreate_Click()
  
 Sheets("MasterSheet").Visible = True
 Worksheets("MasterSheet").Copy After:=Worksheets(Sheets.Count)
 ActiveSheet.Name = TextBox1.Value
 
 If SelCourse1.Value = "Weighted" Then
 Columns("A:F").EntireColumn.Hidden = True
 Else:
 Columns("F:K").EntireColumn.Hidden = True
 End If
 If SelCourse2.Value = "Weighted" Then
 Columns("M:R").EntireColumn.Hidden = True
 Else:
 Columns("R:W").EntireColumn.Hidden = True
 End If
 If SelCourse3.Value = "Weighted" Then
 Columns("Y:AD").EntireColumn.Hidden = True
 Else:
 Columns("AD:AI").EntireColumn.Hidden = True
 End If
 Sheets("MasterSheet").Visible = False
    Unload Me
End Sub
 
Last edited:
Upvote 0
DeezNuts,

Thanks for the resolution. I was interested in the subject matter for this thread.
 
Upvote 0

Forum statistics

Threads
1,215,028
Messages
6,122,753
Members
449,094
Latest member
dsharae57

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top