|
Закомментировать сразу несколько строк кода
|
|||
---|---|---|---|
#18+
Возможно ли в коде VBA в Excel закомментировать сразу несколько строк кода? А то неудобно на каждой строчке ставить знак ' когда нужно закомментить сразу целый блок кода. ... |
|||
:
Нравится:
Не нравится:
|
|||
22.11.2007, 15:53 |
|
Закомментировать сразу несколько строк кода
|
|||
---|---|---|---|
#18+
Можно. Для этого надо вынести на свою панель инструментов 2 кнопки. Одну для закомментирования блока, другую для разкомментирования. Для этого: 1) меню View - ToolBars - Настройка.... (или просто правой клавишей сверху на панели инстументов) 2) В правом окошке "Категории" выберите Edit 3) В левом окошке "Команды" найдите Comment Block и Uncomment Block 4) Схватите их левой клавишей мыши и перетащите каждую на свою панель сверху. Теперь выделяете любой блок кода и нажимаете кнопку Comment Block и у вас весь блок сразу закомментируется. Обратно так же, только кнопка Uncomment Block ... |
|||
:
Нравится:
Не нравится:
|
|||
22.11.2007, 16:13 |
|
Закомментировать сразу несколько строк кода
|
|||
---|---|---|---|
#18+
Вот спасибо! А может еще горячие клавиши для этого есть? ... |
|||
:
Нравится:
Не нравится:
|
|||
22.11.2007, 16:19 |
|
Закомментировать сразу несколько строк кода
|
|||
---|---|---|---|
#18+
Я, к сожалению, не знаю ) P.S. кстати, эти кнопки есть на пенели инструментов Edit :) ... |
|||
:
Нравится:
Не нравится:
|
|||
22.11.2007, 16:47 |
|
Закомментировать сразу несколько строк кода
|
|||
---|---|---|---|
#18+
George RuВот спасибо! А может еще горячие клавиши для этого есть? Я искал и нашел ))) привожу текст оригинала и ссылку: http://www.vbrad.com/article.aspx?id=89 Since version 1.0 VB lacked a block comment feature that C/C++ programmers love so dearly. Finally in version 5, the mothership provided us with half of the solution - one could now go to the Customize menu and add the Comment Block and Uncomment Block button to the toolbar or the menu. And that was good. But if you are a keyboard jockey like us, you want something faster and preferably something faster than the /*...*/ operator in C/C++. This is the story of how to do it: 1. Right click on the toolbar and select Customize... menu 2. Under Categories click on Edit, then select Comment Block in the Commands listbox. 3. Now drag the Comment Block entry onto the Menu Bar (yep! the menu bar) 4. You should now see a new icon on the menu bar. 5. Make sure that the new icon is highlighted (it will have a black square around it) and click Modify Selection button on the Customize dialog box. 6. An interesting menu will popup. Under name, add an ampersand to the beginning of the entry. So now instead of Comment Block it should read &Comment Block. Press Enter to record the change. 7. Click on the Modify Selection button once again and select Image and Text. 8. Dismiss the Customize dialog box. 9. Now highlight any block of code and press Alt-C. Voila. 10. Do the same thing for the Uncomment Block or any other commands that you find yourself using often. ... |
|||
:
Нравится:
Не нравится:
|
|||
24.07.2013, 20:49 |
|
|
start [/forum/topic.php?fid=61&msg=34958928&tid=2174645]: |
0ms |
get settings: |
9ms |
get forum list: |
14ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
42ms |
get topic data: |
12ms |
get forum data: |
3ms |
get page messages: |
43ms |
get tp. blocked users: |
2ms |
others: | 14ms |
total: | 147ms |
0 / 0 |