powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Microsoft Office [игнор отключен] [закрыт для гостей] / WorkBook.Comments
5 сообщений из 5, страница 1 из 1
WorkBook.Comments
    #33848368
ИванZ
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Добый день.

Через меню Excel я могу задать коментарий (заметки) к книге большой длины

а через VBA WorkBook.Comments - не более чем 256 символов

Можно ли как-нибудь обойти эту ситуацию ?

Спасибо.
...
Рейтинг: 0 / 0
WorkBook.Comments
    #33848408
vbapro
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
попробовал создать, вроде получается. или о другом речь?

Код: plaintext
Range("A2").Comment.Text Text:= "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" 
...
Рейтинг: 0 / 0
WorkBook.Comments
    #33848428
ИванZ
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Это коментарий к ячейке а мне нужен коментарий ко всей книге
Файл/Свойства/Заметки
...
Рейтинг: 0 / 0
WorkBook.Comments
    #33848837
ИванZ
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Все решилось через BuiltinDocumentProperties.Item("Comments")
...
Рейтинг: 0 / 0
WorkBook.Comments
    #33849963
Фотография Ivan33
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Use VBA Functions to Return
Excel Document Properties

автор"I would like to add a small formula-driven reference in my Excel worksheets that: (1) Automatically notes the original author/user (or last modifier) of the worksheet. (2) Automatically notes when the worksheet was last modified. Any tips would be much appreciated."

Решение:
авторUnfortunately, there's no way to do what you want using Excel's built-in worksheet functions. However, you can return information like this using two simple VBA macro functions:

Код: plaintext
1.
2.
3.
4.
Public Function LastSaveTime() As String
   Application.Volatile
   LastSaveTime = _
       ThisWorkbook.BuiltinDocumentProperties("Last Save Time")
End Function

Код: plaintext
1.
2.
3.
4.
Public Function LastAuthor() As String
   Application.Volatile
   LastAuthor = _
       ThisWorkbook.BuiltinDocumentProperties("Last Author")
End Function 

авторEach function consists of two instructions. The first tells Excel to recalculate the function each time you recalculate your spreadsheet. The second line returns the information you want. Because of space limitations, the second instruction is displayed in two lines, using the " _" line-continuation symbols of space and underscore.

To use these functions, copy them to a module in your workbook. Then, in a spreadsheet, enter the formulas:

=LastSaveTime()
=LastAuthor()

When you enter these formulas, be sure to include the open and close parentheses as shown.

You can return other information about Office documents with other arguments. To see the complete list of arguments, along with information about the BuiltinDocumentProperties property, select the property in your code and press F1.

Note: The help topic lists property names that apply to all Office products. Less than half of those listed work with Excel. Those that don't return an error message.
...
Рейтинг: 0 / 0
5 сообщений из 5, страница 1 из 1
Форумы / Microsoft Office [игнор отключен] [закрыт для гостей] / WorkBook.Comments
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]