0
A
回答
2
可以使用下面的示例VBA代码段(字体在斜体)实现它:
Worksheets("Sheet1").Range("A1").Font.Italic = True
或设置斜体/粗体类似如下:
Worksheets("Sheet1").Range("A1").Font.FontStyle = "Bold Italic"
(re:https://msdn.microsoft.com/en-us/library/office/ff194438.aspx)
在更普遍的情况下,您可以在Excel Cell
或应用该技术整个文本只是它的一部分,如下图所示:
'demonstrate font Italic/Bold applied to part of Excel cell
Sub DemoFontItalicBold()
Range("A1").Value = "This is Just a Sample Text"
'display "A1" 4 initial chars in bold/italic typeface
Range("A1").Characters(1, 4).Font.FontStyle = "Bold Italic"
'set the word "Sample" in Italic typeface
Range("A1").Characters(WorksheetFunction.Find("Sample", Range("A1").Value, 1), Len("Sample")).Font.Italic = True
'set the word "Text" in bold typeface
Range("A1").Characters(WorksheetFunction.Find("Text", Range("A1").Value, 1), Len("Text")).Font.Bold = True
End Sub
相关问题
- 1. <style type =“text/javascript”>是否有用?
- 2. 是否有一个相当于bash的<()sh
- 3. mail.log相当于php <5.3
- 4. Pythonic相当于./foo.py <bar.png
- 5. <<是一个C++的事情 - 相当于Java
- 6. 是否存在相当于<xs:choice>的“选择”Java注释?
- 7. 什么是htac相当于<meta http-equiv =“Content-Type”content =“text/html; charset = utf-8>
- 8. 访问相当于C#列表的VBA <T>
- 9. VBA相当于在C#中列出<T>
- 10. OpenSL ES中是否有与OpenAL <alc.h>相当的功能?
- 11. <text>与<span>
- 12. jQuery是否具有相当于Dojo的增强功能<select>?
- 13. 是否有一个相当于<c:url/>的JSTL EL(表达语言)
- 14. 对于WPF,是否有IMarkupExtension <T>?
- 15. 是否<input>没有<form>?
- 16. 什么是JavaScript相当于写的“如果</p> <p>不是”
- 17. 什么是<script type =“text/javascript”><!--mce:0--></script>?
- 18. 使用<g:submitbutton>是否有益于<input>或<button>?
- 19. 是否有`sh`等价于bash的`<<<'重定向操作符?
- 20. dplyr相当于DF [DF == X] < - Ÿ
- 21. ruby each_ <size_of_block>相当于each_byte
- 22. 在Swift中相当于id <type>?
- 23. VB6相当于列出<someclass>
- 24. 注解相当于<aop:scoped-proxy>
- 25. c#相当于java.util.concurrent.Future <T>
- 26. mvc 3相当于<asp:repeater>功能?
- 27. ToCharArray相当于列表<string>
- 28. @Configuration相当于<aop:config expose-proxy =“true”/>?
- 29. F#相当于Enumerable.OfType <'a>
- 30. Iphone相当于Android <include>和<merge>标签?
我会说“不”,他们是两个不同的编码语言。 VBA你需要写在你想要斜体范围。 – Davesexcel