strange prob: file not getting closed after vlookup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I do a vlookup from a file 'A' to a file 'B' which had
some 6000 lines. I just do a vlookup on one cell and then
copy paste the remmaining cell values for speeding up.

the problem is when i am using the file for the vlookup
and in the end i close it then the file is not getting
closed. its very strange though. if i comment the vlookup
thing then at the end of the macro i can close it very
smoothly.

what is the reason. I am struggling for it for so long!

thanks in advance
 
Hi

it might have to do with calculating the workbook .. you might like to turn
automatic calculation off in your code at the start of the procedure

Application.Calculation = xlManual

and then turn it back on at the end and see if this makes a difference

Application.Calculation = xlAutomatic

Cheers
JulieD
 
Hey
thanks julie
the problem still persisits. its only when i complete the
macro and in the end if i try and close the workbook "B"
its takes time. (the macro is written for workbook "a".
this is a very strange thing.

i am not writing anythin gin workbooks"B" ... if ideally i
open it and then close it ; it closes imm and smoothly,

whereas if i do a vlookup using that workbook then it
simply hangs!!!!!!

what could be the problem...i am scratching my head since
morning!
 
I may be on the wrong track here, but i've had problems in workbooks where i
have a lot of VLOOKUP statements as VLOOKUP is volatile and keeps wanting to
recalculate all the time ..

so maybe after running the code, you turn calculation to manual (tools /
options / calculation - manual) and then try & close the workbook.

Cheers
JulieD




line in the code but remove the o
 

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

Back
Top