ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Past directly into TextBox on UserForm (https://www.excelbanter.com/excel-programming/285230-past-directly-into-textbox-userform.html)

DonB[_2_]

Past directly into TextBox on UserForm
 
I would like to right click a worksheet cell, copy its
data, open an existing/"homemade" UserForm, select a
TextBox on it, right click, then paste. How? Any ideas
would be much appreciated.

SuperJas

Past directly into TextBox on UserForm
 
Hi DonB,

Another approach might be to use the RefEdit control (say this is named 'refedit1'), assuming that your macro will be using the cell value as input.

So If you wanted to set a variable (named var1 below) to whatever was in the cell, then say

var1=range(refedit1.text).value

This line will return the value in the cell range selected.

I hope this is helpful.

SuperJas.




----- DonB wrote: -----

I would like to right click a worksheet cell, copy its
data, open an existing/"homemade" UserForm, select a
TextBox on it, right click, then paste. How? Any ideas
would be much appreciated.


DonB[_2_]

Past directly into TextBox on UserForm
 
Hi SuperJaz

I'll give it a try - and try to remember how to
spell "paste"

Thanks DonB


-----Original Message-----
Hi DonB,

Another approach might be to use the RefEdit control (say

this is named 'refedit1'), assuming that your macro will
be using the cell value as input.

So If you wanted to set a variable (named var1 below) to

whatever was in the cell, then say

var1=range(refedit1.text).value

This line will return the value in the cell range

selected.

I hope this is helpful.

SuperJas.




----- DonB wrote: -----

I would like to right click a worksheet cell, copy

its
data, open an existing/"homemade" UserForm, select a
TextBox on it, right click, then paste. How? Any

ideas
would be much appreciated.

.



All times are GMT +1. The time now is 02:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com