
Новые сообщения [новые:0]
Дайджест
Горячие темы
Избранное [новые:0]
Форумы
Пользователи
Статистика
Статистика нагрузки
Мод. лог
Поиск
|
|
14.12.2004, 09:25:42
|
|||
|---|---|---|---|
|
|||
Открытие КНИГИ |
|||
|
#18+
Код: plaintext 1. 2. Как написать проверку если книга уже открыта, чтобы второй её не открывать – будет выведено сообщение, что файл уже открыт. СПАСИБО ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
14.12.2004, 09:42:43
|
|||
|---|---|---|---|
|
|||
Открытие КНИГИ |
|||
|
#18+
'цикл по открытым книгам For Each w In Workbooks w.Activate If w.Name = book_name Then Exit For End If Next w 'смотрим как вышли - нашли или нет If ActiveWorkbook.Name = book_name Then ' нашли Else ' открываем Workbooks.Open Filename:=book_name 'не забыть про путь End If ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
21.10.2006, 14:55:16
|
|||
|---|---|---|---|
Открытие КНИГИ |
|||
|
#18+
авторOpening a workbook can really slow down a macro; it takes time to access the disk and load the file. Thus, if your macro can check to see if a workbook is open before going through the hassle of actually trying to open it, you could speed up your macros greatly if the workbook is found to already be open. авторOne very flexible way to approach the task of checking whether a workbook is open is to use a function that does the checking, and then simply returns a TRUE or FALSE value based on whether the workbook is open. The following short macro performs this succinct task: Код: plaintext 1. 2. 3. 4. 5. 6. Код: plaintext 1. 2. 3. 4. 5. 6. Савэт отсюда ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
24.10.2006, 11:38:55
|
|||
|---|---|---|---|
|
|||
Открытие КНИГИ |
|||
|
#18+
Еще парочка вариантов, до кучи. 1. Код: plaintext 1. 2. 3. 4. 5. Код: plaintext 2. XL2002: Macro Code to Check Whether a File Is Already Open . ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|

start [/forum/topic.php?fid=61&mobile=1&tid=2184087]: |
0ms |
get settings: |
8ms |
get forum list: |
13ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
48ms |
get topic data: |
8ms |
get forum data: |
2ms |
get page messages: |
26ms |
get tp. blocked users: |
1ms |
| others: | 199ms |
| total: | 311ms |

| 0 / 0 |
