Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 10th, 2007, 06:38 AM
ghisirds
Guest
 
Posts: n/a
Default Excel and Notepad: how avoid additional inverted..

Hi,
If I write a multi-line text in a cell (then go down with alt+enter) and after copy the cell pasting on Notepad, it display before inverted commas and after textual content.
Instead, if I select directly the content from the formula bar, it isn't happen.
Do exist a way for copy and paste directly from the cell without select from the formula bar?
Maybe with a macro?

Thank
Marco

__________________
http://www.idee-regalo.biz/catalogo-stereogrammi-3.html http://www.ghisirds.it/ http://scuo.la/ http://www.righettofabrizio.com/pant...io-plasma.html

 
Old September 10th, 2007, 06:58 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Here is the way to extract contents

Sub Extract_Text()

Dim oWB As Workbook
Dim lRow As Long


Set oWB = ActiveWorkbook


Open "c:\Temp.txt" For Append As 1
For Each SHT In oWB.Sheets
 lRow = SHT.Cells.SpecialCells(xlCellTypeLastCell).Row
 For l = 2 To lRow
    Print #1, Trim$(SHT.Cells(l, 2).Value)
 Next l
Next SHT
Close #1

oWB.Close False

End Sub

You need to tweak a bit for the range

Cheers
Shasur

http://www.dotnetdud.blogspot.com

VBA Tips & Tricks (http://www.vbadud.blogspot.com)
 
Old September 11th, 2007, 05:11 PM
ghisirds
Guest
 
Posts: n/a
Default

In the meantime, thank you for the reply but Notepad was an example.
Really I must paste the cell content on other programs that operate as Notepad.
Then the contents without inverted commas have to stay only on clipboard.
Is it possible?
Thank you very much!
Marco






Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem of inverted comma indikalk PHP FAQs 0 December 19th, 2006 11:47 PM
how to avoid edit of inserted data in Excel? kotaiah Excel VBA 3 September 14th, 2006 01:49 AM
HELP!!: Sorting multiple selection AND inverted aefavant Excel VBA 0 June 6th, 2006 03:58 PM
inverted comma problems in ASP response.write paulmcn Classic ASP Basics 2 September 16th, 2005 04:52 AM
VB: Opening CSV file in Excel versus notepad codehappy VB How-To 6 April 22nd, 2005 10:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.