using ControlSource property in userform

heroldman

New Member
Joined
Aug 13, 2010
Messages
26
Greetings,

in my worksheet I have a userform which shows up on double click on a cell and displays data from some specific columns in the row of clicked cell (sort of 'record's short report')

Now I've added a textbox for user's comments for the record which I'd like to be stored in column named 'archive' (and displayed when the form is activated next time).
If I get it right, ControlSource property is what should do the job - and it does for one record and specific cell when typed like that:
Code:
TextBox3.ControlSource = (CK2)
but what I need is to set the source cell adress in some way like that:
Code:
TextBox3.ControlSource = Cells(ActiveCell.Row, Range("archive").Column)
My question is whether it does not work because of my code errors or maybe the reason is in some ControlSource property limitations?

TIA
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
The ControlSource property requires a text string as the cell reference. Try something like this...

Code:
TextBox3.ControlSource = Cells(ActiveCell.Row, Range("archive").Column)[COLOR="Red"].Address[/COLOR]
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,459
Messages
6,124,946
Members
449,198
Latest member
MhammadishaqKhan

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