ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   selecting contents of a text box in vba (https://www.excelbanter.com/excel-programming/294631-selecting-contents-text-box-vba.html)

Neil[_18_]

selecting contents of a text box in vba
 
Dumbo question, but this is about my second day ever playing with VBA.

I have a text box (not in a user form, just a rectangle with text written in
it) that contains the names/e-mails of a distribution list on a worksheet.

I have a macro that will send an e-mail using the Outlook .To function at a
click, but I want to use the contents of this box.

I know how to use the contents of a cell, but I really need to use the text
box

it must be really simple, but it's eluding me.

I keep searching the net but searching for 'textbox' keeps leading me to
userforms which isn't what I need.

Can anybody help?

- - How far off am I with

SendTo = ActiveSheet.Range("Rectangle 3").Value





Tom Ogilvy

selecting contents of a text box in vba
 
As a demonstration from the immediate window:

? activesheet.Rectangles("Rectangle 1").Text
abcdef

--
Regards,
Tom Ogilvy

"Neil" wrote in message
...
Dumbo question, but this is about my second day ever playing with VBA.

I have a text box (not in a user form, just a rectangle with text written

in
it) that contains the names/e-mails of a distribution list on a worksheet.

I have a macro that will send an e-mail using the Outlook .To function at

a
click, but I want to use the contents of this box.

I know how to use the contents of a cell, but I really need to use the

text
box

it must be really simple, but it's eluding me.

I keep searching the net but searching for 'textbox' keeps leading me to
userforms which isn't what I need.

Can anybody help?

- - How far off am I with

SendTo = ActiveSheet.Range("Rectangle 3").Value








All times are GMT +1. The time now is 05:02 PM.

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