View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
mike mike is offline
external usenet poster
 
Posts: 24
Default End(xlDown) won't work

JL,

The code got reformatted when I pasted to the forum.

I was copying to sheet"Build List" then I decided to copy to another
sheet. No other changes. So, I went into the code and just replaced
"Build List" with "data". That's all I did, promise...

The difference is in the number of nonempty cells before it gets to the
first empty cell. Apparently, it won't work if there's less than two
nonempty cells before the first empty cell. When sheet "data" is clean
and only the header row (row 1) is filled (with header titles in each
column), it stalls. When I go to row 2 (A2) and put something in it,
then it'll run fine, starting at cell A3.

??

JLGWhiz wrote:
Mike, your code works OK. Check it by stepping through one line at a time.
I think you might have part of a line of code below the line it should be
part of.

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, 'No attenuator here
SkipBlanks:= _
False, Transpose:=False

This should all be one line of code.

"mike" wrote:

Well I'm wanting to start at the first 'different' cell, that is the
first empty cell.

Apparently something about there only being one non-empty cell in the
range specified is throwing it off.

For example, I'm trying to find the first unused cell to paste to. It
doesn't work until I have at least two cells in the range that are not
empty. If only one is not empty, it freaks. I don't know why. I can add
an extra row to get it to work but it's really bugging me as to why it
doesn't just work with only one nonempty cell.