N
N
NataliaCh2019-05-23 16:05:42
Macros
NataliaCh, 2019-05-23 16:05:42

How to save a hidden excel sheet to a separate file?

You need to save one of the sheets of the book in csv format to a separate file. The macro should be triggered when the document is saved. The problem is that you need to save the hidden sheet.
If you use this solution:

With Worksheets("ИмяЛиста")
        .Visible = -1    ' делаем лист видимым
        .Copy    ' копируем 
        .Visible = 0    ' делаем лист снова скрытым
 End With

then everything works, but at the time of saving the file, the hidden sheet is shown to the user for a while. A kind of blinking of a leaf. Somehow not aesthetically pleasing and not very clear to the user what is happening.
Question: is it possible somehow completely imperceptibly for the user to copy information from a hidden sheet to a csv file?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Valery, 2019-05-23
@NataliaCh

at the beginning of the macro
application.screenupdating = false
and at the end
application.screenupdating = true
This will help to hide the flicker and the user will not see the sheet.

A
Alexey Sklyarov, 2017-05-28
@0example

Nothing breaks for you, just products are displayed immediately according to the two specified filters.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question