P
pswanie
i got a listbox to list all sheets in workbook.
1) only select one sheettab
2) when user click commandbutton3 put data in the selected sheet
3)not in cell n9 but next open cell in column 9
Private Sub CommandButton3_Click()
myStr = ""
With Me.ListBox1
For iCtr = 0 To .ListCount - 1
If .Selected(iCtr) = True Then
myStr = myStr & ", " & .List(iCtr)
End If
Next
End With
If myStr = "" Then
'nothing checked
MsgBox "Please Select the month this data needs to go to" '& _
''vbNewLine & "If the Name does not appear then add it"
Else
'TextBox7.Value = Format(TextBox7.Value, "##:##")
Range("n9").Value = TextBox7.Value
'myStr = Mid(myStr, Len(mySep) + 1)
End If
1) only select one sheettab
2) when user click commandbutton3 put data in the selected sheet
3)not in cell n9 but next open cell in column 9
Private Sub CommandButton3_Click()
myStr = ""
With Me.ListBox1
For iCtr = 0 To .ListCount - 1
If .Selected(iCtr) = True Then
myStr = myStr & ", " & .List(iCtr)
End If
Next
End With
If myStr = "" Then
'nothing checked
MsgBox "Please Select the month this data needs to go to" '& _
''vbNewLine & "If the Name does not appear then add it"
Else
'TextBox7.Value = Format(TextBox7.Value, "##:##")
Range("n9").Value = TextBox7.Value
'myStr = Mid(myStr, Len(mySep) + 1)
End If