I have several textboxes with buttons that populate several cells in a single column and then copies that column so that I can then paste the contents into a seperate company data entry program that is web based. I have enabled the enter key (for carriage returns) in the textboxes so that paragraphs can be written. However, if the return button is used in a text box, it translates over to the assigned cell as if I had selected <alt enter>. Therefore, whenever I paste it into the web based program, annoying quotation marks show up around the data in that cell when the column is copied.
This can be duplicated by entering text into any cell and using the <alt enter> function at some point. If you copy and paste it into Microsoft Notepad, you will see the unwanted quotation marks I am talking about. I have found code that eliminates this for individual cells, but I cannot figure out how to adapt it for the entire column. I have attached the macro I found below.
The issue is in line 4 where it uses 'ActiveCell.Text'. This only allows the text for the first cell in the column to be copied. I need the entire column. I have tried many variations without success. I was wondering if any of you know the proper code to select the entire column. It is probably an easy solution but it has me scratching my nogin.
This can be duplicated by entering text into any cell and using the <alt enter> function at some point. If you copy and paste it into Microsoft Notepad, you will see the unwanted quotation marks I am talking about. I have found code that eliminates this for individual cells, but I cannot figure out how to adapt it for the entire column. I have attached the macro I found below.
The issue is in line 4 where it uses 'ActiveCell.Text'. This only allows the text for the first cell in the column to be copied. I need the entire column. I have tried many variations without success. I was wondering if any of you know the proper code to select the entire column. It is probably an easy solution but it has me scratching my nogin.
Code:
Option Explicit
Sub testme()
Dim MyDataObj As DataObject
Set MyDataObj = New DataObject
MyDataObj.SetText ActiveCell.Text
MyDataObj.PutInClipboard
End Sub