TextBox.

Nigel Martin

Board Regular
Joined
Feb 17, 2002
Messages
133
In column 'C' of my spreadsheet I have comments from variuos people which must be quoted in full upwards of 1000 charaters. I have inserted a UserForm with a TextBox on it with its source pointing at the first of my list in column 'C' (ie source box =C3). What code do I need so that when the user uses an arrow (direction) key to go down or up to the next cell, the UserForm refreshes with the appropriate cell reference from column 'C' ?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
On 2002-04-15 00:06, Nigel Martin wrote:
In column 'C' of my spreadsheet I have comments from variuos people which must be quoted in full upwards of 1000 charaters. I have inserted a UserForm with a TextBox on it with its source pointing at the first of my list in column 'C' (ie source box =C3). What code do I need so that when the user uses an arrow (direction) key to go down or up to the next cell, the UserForm refreshes with the appropriate cell reference from column 'C' ?

Hi Nigel you could use the worksheets change
event to update the userorms checkbox eg
In the relevant sheet

<pre/>
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 3 And UserForm1.Visible = True Then
UserForm1.TextBox1.Text = Target.Text
End If
End Sub
</pre>
Note, I'm assuming your UFrm is showmodal=false
and you are selecting the cells via key input change by the user.
 
Upvote 0

Forum statistics

Threads
1,213,552
Messages
6,114,278
Members
448,560
Latest member
Torchwood72

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top