Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Philip
The code below is one way of doing it Option Explicit Dim i As Integer Dim Ctrl As Control Private Sub CommandButton1_Click() For i = 1 To 4 Set Ctrl = UserForm1.Controls("CheckBox" & i) If Ctrl.Value = True Then Sheets(i).Activate ActiveWindow.SelectedSheets.PrintOut _ Copies:=1, Collate:=True End If Set Ctrl = Nothing Next i End Sub Private Sub CommandButton2_Click() If TextBox1.Value = "user2" Then With Sheets(6) .Unprotect ("user1") .Cells(33, 6).Value = TextBox2.Value .Protect ("user1") End With End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
checkbox and textbox help needed | Excel Programming | |||
Action Event, CheckBox, Add Row and Textbox | Excel Discussion (Misc queries) | |||
link a checkbox in a sheet to a checkbox on a userform? | Excel Programming | |||
Excel VBA - Userform Checkbox/Textbox Problem | Excel Programming | |||
UserForm TextBox to ActiveSheet TextBox over 256 characters | Excel Programming |