Scroll when importing data

K

knut

Excel 2007

I have a VBA-routine that imports data from an external source. There will
be hundreds of rows imported, and this takes several minutes to complete. I
would like to always have the last imported row visible. As it is now the
page does not scroll as the import takes place.
Does anyone understand what I am after, and does anyone have a solution? I
do not have the VBA-routien at hand right now so I can't share it with you.

Thanx
Knut
 
G

Gary Keramidas

you can try adding something like this to the end of your routine, just change
the column letter.

lastrow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
Application.Goto ActiveSheet.Range("A" & lastrow), scroll:=True
 
R

Roger Govier

Hi

I usually like to see that last few rows of data when i jump to the end of
the list, so code something like the following after your copy routine
should work

Dim lr As Long
lr = Cells(Rows.Count, 1).End(xlUp).Row
Cells(lr, 1).Activate
ActiveWindow.ScrollRow = lr - 6


--
Regards
Roger Govier

knut said:
Excel 2007

I have a VBA-routine that imports data from an external source. There will
be hundreds of rows imported, and this takes several minutes to complete.
I would like to always have the last imported row visible. As it is now
the page does not scroll as the import takes place.
Does anyone understand what I am after, and does anyone have a solution? I
do not have the VBA-routien at hand right now so I can't share it with
you.

Thanx
Knut


__________ Information from ESET Smart Security, version of virus
signature database 4752 (20100107) __________

The message was checked by ESET Smart Security.

http://www.eset.com

__________ Information from ESET Smart Security, version of virus signature database 4752 (20100107) __________

The message was checked by ESET Smart Security.

http://www.eset.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