作者:乔山办公网日期:
返回目录:excel表格制作
创建zd专TextBox1 和属CommandButton1
sub CommandButton1_Click()
dim n as integer
dim str as string
n=sheets(1).usedrange.rows.count+1
str=textbox1.text
sheets(1).cells(n,1)=str
end sub
字符串续航一般先把字符串分成几个小字串,用 & 连接,并使用换行符
str="12311231312323" & _
"dsafasdasdasd"
解决百办法如下:度
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column > 5 Then
Cells(Target.Row + 1, 1).Select
End If
End Sub
上面是问>5,即数据输到E列,答再往版右就会换行权。
Private Sub ComboBox1_Change()
Sheets("品名百度").Select
Lable6.Caption = Application.WorksheetFunction _
.VLookup(ComboBox1.Text, Range("A1:B100"), 2, False)
Label5.Caption = Application.WorksheetFunction _
.VLookup(ComboBox1.Text, Range("A1:E100"), 3, False)
TextBox1.Text = ""
TextBox1.SetFocus
Sheets("登记知数道据内容").Select
End Sub