ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Move data from text box to cell (https://www.excelbanter.com/excel-programming/413210-move-data-text-box-cell.html)

[email protected]

Move data from text box to cell
 
I have a function where data is typed in a text box (on a chart-sheet)
and copied to a data-sheet for further calculations. My problem is
that if you type a value with more that 2 decimals the decimal
separator is lost.
eg.
134,6 - 134,6
134,65 - 134,65
134,656 - 135656

It works if you use a " . " instead of a " , " but that's not the
standard.

My code is:

ActiveSheet.Shapes("Autoshape 2").Select
Input1 = Selection.Characters.Text
Cells(1,1) = Input1


Any suggestions?

Best regards
/Peter

Jarek Kujawa[_2_]

Move data from text box to cell
 
try:

Cells(1, 1) = Input1 + 0

or

Cells(1, 1) = Input1 * 1


All times are GMT +1. The time now is 10:29 PM.

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