macro code selecting moving range

K

KDG

I changed it to..
Workbooks("LCLI.xls").Activate
Workbooks("LCLI.xls").Sheets("LCLI").Activate

and it got past that line, but further down at this point, it errore
out, too....
ActiveWorkbook.Worksheets("LCLI.XLS").Sort.SortFields.Clear

and I'm sure that this is a "simple" fix for minds that know wha
they're doing <you> and not for those of us who are still strugglin
<me!>.:confused:

And I'm sure that whatever change is made in this line is likely neede
in the other like lines that follow in the sort lines. Am I right or wa
off base
 
S

Simon Lloyd

KDG;436514 said:
I changed it to.
Workbooks("LCLI.xls").Activat
Workbooks("LCLI.xls").Sheets("LCLI").Activat

and it got past that line, but further down at this point, it errore
out, too...
ActiveWorkbook.Worksheets("LCLI.XLS").Sort.SortFields.Clea

and I'm sure that this is a "simple" fix for minds that know wha
they're doing <you> and not for those of us who are still strugglin
<me!>.:confused

And I'm sure that whatever change is made in this line is likely neede
in the other like lines that follow in the sort lines. Am I right or wa
off base?Last try for today as im signing off, it was my fault i forgot the .xl
form the workbook name but this lin
ActiveWorkbook.Worksheets("LCLI.XLS").Sort.SortFields.Clear should no
have the .XLS as you are working with the worksheet which is an objec
within the .XL

--
Simon Lloy

Regards
Simon Lloy
'Microsoft Office Help' (http://www.thecodecage.com
 
K

KDG

aahhhh!!!! I'll give that a shot! Thanks so much for all your patienc
and persistence! You're a doll!!! Good night! I'll post a thread to le
you know how it goes
 
S

Simon Lloyd

That destination is a fixed size if you are always pasting 3 coulmns o
data and it will always be the Activecell.offset(0, 1) then loose th
Range("A1:C6842") as all that does is set the size of the paste area no
the destination, the destination cell is your activecell.offset

Does that help
KDG;436556 said:
aahhhh!!!! I'll give that a shot! Thanks so much for all your patienc
and persistence! You're a doll!!! Good night! I'll post a thread to le
you know how it goes.

Ok.. so I tried it (taking out the .xls from those lines and an
subsequent lines). That got me back to my original question that I ha
before I sent the files to you. I'm still erroring out at the red lin
here
Selection.End(xlDown).Selec
ActiveCell.Offset(1, -3).Range("A1:C1").Selec
Range(Selection, Selection.End(xlDown)).Selec
Selection.Cut Destination:=ActiveCell.Offset(0, 1).Range("A1:C6842"

Each time this is run, the cut range will differ, therefore th
destination range cannot be static, either. So.... ???? Hope you have
great nite and a wonderful Friday morning! I will be working on printin
and preparing a distribution of a newsletter to our clients in th
morning, so you have plenty of time to help others in probably more nee
than I... Again, you don't know how much I appreciate not only you
help, but how much I have learned! Thank you, thank you, thank you!!

--
Simon Lloy

Regards
Simon Lloy
'Microsoft Office Help' (http://www.thecodecage.com
 
K

KDG

WOW!!!! I think we got it!!!! Yes! I've run it on three differen
downloads and so far, so good! I think I've gotten it to where I need i
to be! Of course I couldn't have done it without you!!! YYYAAAAA!!!!!

I can stop bugging you today! It's Friday, it's afternoon (evening fo
you) and I can say that I've really improved my work life by this on
little thing. And with what I've learned from you, I can apply some o
this on another similar file that I do each month, also. My hopes are t
someday take what used to take my predicesor a month to do manually an
make it into a simple, no-brainer, one-day task. I've already had i
down to about 4-5 days, depending on the changes to our client listin
and this will chip away at that.

THANK YOU SOOOOO MUCH!!!! and have a WONDERFUL weekend!!!!

Kathryn G.
Moline, IL, US
 
S

Simon Lloyd

KDG;437595 said:
WOW!!!! I think we got it!!!! Yes! I've run it on three differen
downloads and so far, so good! I think I've gotten it to where I need i
to be! Of course I couldn't have done it without you!!! YYYAAAAA!!!!

I can stop bugging you today! It's Friday, it's afternoon (evening fo
you) and I can say that I've really improved my work life by this on
little thing. And with what I've learned from you, I can apply some o
this on another similar file that I do each month, also. My hopes are t
someday take what used to take my predicesor a month to do manually an
make it into a simple, no-brainer, one-day task. I've already had i
down to about 4-5 days, depending on the changes to our client listin
and this will chip away at that

THANK YOU SOOOOO MUCH!!!! and have a WONDERFUL weekend!!!

Kathryn G
Moline, IL, US

Glad we could be of help

--
Simon Lloy

Regards
Simon Lloy
'Microsoft Office Help' (http://www.thecodecage.com
 

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