Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Microsoft Office [игнор отключен] [закрыт для гостей] / WorkBook.Comments / 5 сообщений из 5, страница 1 из 1
12.07.2006, 15:11:44
    #33848368
ИванZ
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
WorkBook.Comments
Добый день.

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

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

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

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

Код: plaintext
Range("A2").Comment.Text Text:= "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" 
...
Рейтинг: 0 / 0
12.07.2006, 15:21:06
    #33848428
ИванZ
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
WorkBook.Comments
Это коментарий к ячейке а мне нужен коментарий ко всей книге
Файл/Свойства/Заметки
...
Рейтинг: 0 / 0
12.07.2006, 16:38:24
    #33848837
ИванZ
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
WorkBook.Comments
Все решилось через BuiltinDocumentProperties.Item("Comments")
...
Рейтинг: 0 / 0
13.07.2006, 10:22:40
    #33849963
Ivan33
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
WorkBook.Comments
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
Форумы / Microsoft Office [игнор отключен] [закрыт для гостей] / WorkBook.Comments / 5 сообщений из 5, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


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