ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy/paste text in cells into a textbox (https://www.excelbanter.com/excel-programming/286898-copy-paste-text-cells-into-textbox.html)

ian123[_40_]

Copy/paste text in cells into a textbox
 
Early today i tried to copy some text from a cell into a text box -
without success. Is this a weakness of excel? Does anyone know a good
macro that, after i select a selection of cells, will copy this
information into a text box?

Ideally i'd like to keep the formating of the cells if possible - but
obviously any suggestions would be great

Many thanks


---
Message posted from http://www.ExcelForum.com/


pikus

Copy/paste text in cells into a textbox
 
If you're just copying and pasting, copy the information inside the
cells instead of the cells themselves. You'll have to do that one at a
time. If you're doing something with VBA, do something like this:

var1 = Cells(1, 1).Value & Cells(1, 2).Value & Cells(1, 3).Value
TextBox1.Text = var1

- Pikus


---
Message posted from http://www.ExcelForum.com/



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

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