Цитата:
Сообщение от
vasiliy
А что за функция ExecuteExcel4Macro?
Ну, это в хелпе по Excel VBA можно почитать. Запускает макрофункции Excel версии 4. Иногда в этих аналах истории встречаются полезные вещи.
Чтобы было не страшно пользоваться конструкцией, которую я привел, вот выдержка из хелпа (что это не "палёнка"

):
Цитата:
Сообщение от
Microsoft Excel 4.0 Macro Functions
GET.DOCUMENT
Returns information about a sheet in a workbook.
Syntax
GET.DOCUMENT(type_num , name_text)
Type_num is a number that specifies what type of information you want. The following lists show the possible values of type_num and the corresponding results.
Type_num -- Returns
50 -- The total number of pages that would be printed based on current settings, excluding notes, or 1 if the document is a chart.
Name_text is the name of an open workbook. If name_text is omitted, it is assumed to be the active workbook.
Читая эту цитату, необходимо иметь в виду, что "workbook" в версии 4.0 это фактически то, что сейчас "worksheet". Давным-давно в одном файле Excel был только один рабочий лист.