Paste cells without tabs

H

hmm

I want to copy the contents of two horizotally adjacent cells, and paste the
contents to rename a file in Windows Explorer. However, the clipboard
retains a tab character between the text in the cells.

How can I copy and paste the cells as run-on text, without a tab character
in between? (I want to avoid, if possible, creating a third column to
concatenate the two cells.)
 
J

Joel

Because you are only copying two cells I would copy them one at a time. I
would then replace the tab with a space while copying

a = Range("A1")
b = Replace(a, Chr(9), " ")
'put b into window Explorer
a = Range("B1")
b = Replace(a, Chr(9), " ")
'put b into window Explorer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top