VBA

Visual Basic for Applications
Append Blank
2013/06/18

Private Sub CommandButton1_Click()
 Range(“a1:a1”).Select                 ‘Go Cell A1
     Selection.End(xlDown).Select   ‘Goto Last record
     ActiveCell.Offset(1, 0).Select    ‘Move Down row+1
     ActiveCell.Value = TextBox1.Text
ActiveCell.Offset(0, 1).Select    ‘Move Right column+1
ActiveCell.Value = TextBox2.Text
TextBox1.Text = “”
TextBox2.Text = “”
TextBox1.Activate
End Sub

ใส่ความเห็น

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / เปลี่ยนแปลง )

Twitter picture

You are commenting using your Twitter account. Log Out / เปลี่ยนแปลง )

Facebook photo

You are commenting using your Facebook account. Log Out / เปลี่ยนแปลง )

Google+ photo

You are commenting using your Google+ account. Log Out / เปลี่ยนแปลง )

Connecting to %s