0

我需要填写目录。

我想为此进行输入Userform,通过单击按钮将add new productTextboxes插入到特定列

Private Sub CommandButton1_Click()

 Sheet3.Cells.Rows.Insert
 Sheet3.Cells(25, 27).Value = TextBox1.Value



End Sub
4

1 回答 1

2

这是你正在尝试的吗?

Private Sub CommandButton1_Click()
    With Sheet3
        '~~> Insert row at the 25th row.
        .Rows(25).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
        '~~> Add textbox value
        .Cells(25, 27).Value = TextBox1.Value
    End With
End Sub
于 2013-02-19T10:58:31.483 回答