J
John
I currently have a document with two tables containing a series of text
boxes. The text boxes
are linked via a macro such that when a user clicks on a command button the
input
from a text box in one table is copied to a second box in the second table
further down the page.
The macro so far uses the following code;
Private Sub CommandButton1_Click()
TextBox1.SelStart = 0
TextBox1.SelLength = TextBox1.TextLength
TextBox1.Copy
TextBox2.SelStart = 0
TextBox2.Paste
TextBox1.SelStart = 0
End Sub
Private Sub TextBox1_Change()
TextBox2.Text = TextBox1.Text
End Sub
The users currently pick and choose which pieces of text they wish to
move to the second box however as the macro moves the text to a
specific box, if we do not pick all of the items the second table is left
with gaps
which is less than ideal.
Hence is there any way that I can make the macro copy the text from the
selected box to the
next available cell or row in the second table rather than to a specified
text box?
boxes. The text boxes
are linked via a macro such that when a user clicks on a command button the
input
from a text box in one table is copied to a second box in the second table
further down the page.
The macro so far uses the following code;
Private Sub CommandButton1_Click()
TextBox1.SelStart = 0
TextBox1.SelLength = TextBox1.TextLength
TextBox1.Copy
TextBox2.SelStart = 0
TextBox2.Paste
TextBox1.SelStart = 0
End Sub
Private Sub TextBox1_Change()
TextBox2.Text = TextBox1.Text
End Sub
The users currently pick and choose which pieces of text they wish to
move to the second box however as the macro moves the text to a
specific box, if we do not pick all of the items the second table is left
with gaps
which is less than ideal.
Hence is there any way that I can make the macro copy the text from the
selected box to the
next available cell or row in the second table rather than to a specified
text box?