Copy cell value and delete white spaces at the end?
Hi experts!
I made a little excel worksheet to make my daily work a little easier. (Excel 97)
Now I have a simple problem!
I have a macro applied to a button and when I click on it a cell is copied in the clipboard because I need the data in a different application. The date in the cell is variable and changes depending what I did before I hit the copy button.
The cell is filled like that:
Range("K35").Select
ActiveCell.FormulaR1C1 = ActiveCell.Value & Cells(1, 1)
That works great but when I paste the content from the clipboard in another application (ex. notepad) there are a lot of white spaces after the cell content. I need to delete this white spaces before I paste the value in the other application.
I tried a few times with "Trim" but with no success. I don't know much about macro programming.
To copy the cell with the macro, I select the cell and then I use the copy funtion.
How can I delete this white spaces?
Range("F5").Select
Selection.Copy
Thank you so much!
Regards,
Michael
|