View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Concatenate & Write to Text File

Probably better to replace

For Each rCell In Selection.EntireRow.Columns(1).Cells

with

For Each rCell in Range("A3:A" & _
Range("A" & Rows.Count).End(xlUp).Row)

In article . com,
"Dan R." wrote:

Excellent, works great JE. Quick question if I might, I'm trying to
stay away from using a selected range. Could I just use something like
this:

Dim rng1 As Range
Dim rng2 As Range
Dim rng3 As Range

Set rng1 = Range("A3", Cells(Rows.Count, 1))
Set rng2 = Range("C3", Cells(Rows.Count, 3))
Set rng3 = Range("D3", Cells(Rows.Count, 4))

And then maybe: sData = rng1 & rng2 & rng3
or something of the like?

Also, our computers are set up like this: C:\Documents and Settings
\username\Desktop, is there a way to have the txtfile output to the
users desktop without having to prompt for the directory?

Thanks again,
-- Dan