G
Gregg Roberts
Hi,
I am running into the frustrating problem I've seen
occasionally where Excel simply doesn't do what I'm
telling it to do.
I am working with a lot of data and opening one "data"
workbook at a time out of perhaps 40 in a folder, with
four other workbooks open at any one time, in which I am
accumulating filtered data from the "data" workbook. Is it
possible there is a memory leak or something that is
overwhelming Excel with no error message? I am using Set
statements with Workbook variables, but I am re-using only
five Workbook variables. Should I set them to Nothing
between the times when I re-assign them to a new workbook?
The statement
ActiveCell.SpecialCells(xlLastCell).Offset(1, -7).Select
is being ignored. As a result, data gets pasted further
and further to the right and above where it should get
pasted.
I know it's not working because I stepped through the code
and alt+tabbed to see the result. Screen updating is NOT
turned off. The macro can't do its task properly, even if
I could accept the bizarre offsetting pattern of pasting,
because at some point a range of cells remains selected in
the destination sheet, rather than one cell being
selected. The copied and destination ranges don't have the
same size and shape, so I get an error.
I tried putting 'Range("A1").Select' in front of the above
statement, and it is being ignored too. The rectangle of
selected cells stays selected.
TIA,
Gregg Roberts
I am running into the frustrating problem I've seen
occasionally where Excel simply doesn't do what I'm
telling it to do.
I am working with a lot of data and opening one "data"
workbook at a time out of perhaps 40 in a folder, with
four other workbooks open at any one time, in which I am
accumulating filtered data from the "data" workbook. Is it
possible there is a memory leak or something that is
overwhelming Excel with no error message? I am using Set
statements with Workbook variables, but I am re-using only
five Workbook variables. Should I set them to Nothing
between the times when I re-assign them to a new workbook?
The statement
ActiveCell.SpecialCells(xlLastCell).Offset(1, -7).Select
is being ignored. As a result, data gets pasted further
and further to the right and above where it should get
pasted.
I know it's not working because I stepped through the code
and alt+tabbed to see the result. Screen updating is NOT
turned off. The macro can't do its task properly, even if
I could accept the bizarre offsetting pattern of pasting,
because at some point a range of cells remains selected in
the destination sheet, rather than one cell being
selected. The copied and destination ranges don't have the
same size and shape, so I get an error.
I tried putting 'Range("A1").Select' in front of the above
statement, and it is being ignored too. The rectangle of
selected cells stays selected.
TIA,
Gregg Roberts