Dim rng as Range
set rng = Sheets("Engine List").Range("B5")
do until rng = ""
set rng = rng.offset(1,0)
Loop
Sheets("Client Matrix").Range("EnChData").Copy
rng.PasteSpecial Paste:=xlValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
Sheets("Client Matrix").Select
Application.CutCopyMode = False
Range("AQ1").Select
--
Regards,
Tom Ogilvy
"Daminc" wrote in
message ...
Hi, as you can probably see this is my first posting here.
I've only just been tasked to get to grips with VBA and things are
progressing slowly.
My main problem at this moment is that I am trying to decipher a
problem in this Excel 2000 tool that a co-worker built. Unfortunately
the guy was extremely talented and is no longer with us (passed away).
I think I may have identified an area that might be wrong but I simply
to not have the experience to know for certain (and find a solution)
Here's the code in question:
Sheets("Client Matrix").Select
Application.Goto Reference:="EnChData"
Selection.Copy
Sheets("Engine List").Select
*Range("B5").Select
Do Until ActiveCell = ""
ActiveCell.Offset(1, 0).Range("A1").Select
Loop
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False*
Range("A5").Select
Sheets("Client Matrix").Select
Application.CutCopyMode = False
Range("AQ1").Select
The data at 'EnChData' is there where it should be and I believe the
enboldened bit goes to the 'Engine List' sheet, selects B5, moves down
to the next blank cell and then pastes the information from
'EnChData'.
It doesn't work. Nothing gets pasted. I don't know if it's this:
'ActiveCell.Offset(1, 0).Range("A1").Select' that is the problem
because it doesn't make sense to me.
Any help would be appreciated.
Cheers.
--
Daminc
------------------------------------------------------------------------
Daminc's Profile:
http://www.excelforum.com/member.php...o&userid=27074
View this thread: http://www.excelforum.com/showthread...hreadid=465942