CAN files be accessed with a macro when closed

  • Thread starter Thread starter Berj
  • Start date Start date
B

Berj

Dear Anybody.

During recording a Macro, I have copied and pasted from different files and
sheets. In doing this, I have clicked on the files and sheets needed.
When the recorded Macro is running, it is maximizing the files needed
(considering they are open). This shows a lot of switching between windows
which is not needed.
- Can the window switching be disabled when the files are being accessed? How?
- Can the files be accessed even when they are closed? How?
Is there a way of adding a single command at the beginning of the macro to
do any of the things mentioned above?


Thanks in Advance.
 
During recording a Macro, I have copied and pasted from different files
and
sheets. In doing this, I have clicked on the files and sheets needed.
When the recorded Macro is running, it is maximizing the files needed
(considering they are open). This shows a lot of switching between windows
which is not needed.
- Can the window switching be disabled when the files are being accessed?
How?
- Can the files be accessed even when they are closed? How?
Is there a way of adding a single command at the beginning of the macro to
do any of the things mentioned above?


Thanks in Advance.
Hi

Put this at the start of your code to prevent screenupdating.

Application.screenupdating =False


Just remember to set

Application.screenupdating = True

at the end of the code.

Regards

Per
 
Per Jessen said:
Hi

Put this at the start of your code to prevent screenupdating.

Application.screenupdating =False


Just remember to set

Application.screenupdating = True

at the end of the code.

Regards

Per


This helped a lot. Thank you.
But I still have a problem.
The files have to be open so that the Macro works.
Is there a command again which I can add at the beginning of the macro so
that the data in the files can be accessed even if they are closed?
 

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