|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
改进一下
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- If Target.Column = 4 And Target.Row > 1 Then
- UserForm1.Show 0
- End If
- End Sub
- Private Sub CommandButton1_Click()
- Dim Ctr As Control
- Dim i As Integer
- Dim rn As Range
- For Each Ctr In Me.Controls
- If Ctr.Value = True Then s = s & Ctr.Caption & ","
- Next
- ' Set rn = Application.InputBox("请选择存放的单元格", , , , , , , 8)
- ' rn.Value = VBA.Left(s, VBA.Len(s) - 1)
- Selection = VBA.Left(s, VBA.Len(s) - 1)
- Unload Me
- End Sub
- Private Sub CommandButton2_Click()
- End
- End Sub
复制代码 |
|