With X1Sheet
.Range("D" & 1 & ":G" & 1).Select
X1App.ActiveCell.FormulaR1C1 = "FRAMES/LENS TRACE REPORT"
X1App.Selection.MergeCells = True
With X1App.Selection.Font
.SIZE = 18
.Bold = True
End With
End with
为什么不能改变字体的大小? 我将字体Size设为18,但是在EXCEL中打开看时却是Excel默认的10,为什么,哪里有问题??请教大家.....
.Range("D" & 1 & ":G" & 1).Select
X1App.ActiveCell.FormulaR1C1 = "FRAMES/LENS TRACE REPORT"
X1App.Selection.MergeCells = True
With X1App.Selection.Font
.SIZE = 18
.Bold = True
End With
End with
为什么不能改变字体的大小? 我将字体Size设为18,但是在EXCEL中打开看时却是Excel默认的10,为什么,哪里有问题??请教大家.....
解决方案 »
- 循环操作控件
- VB 读文件 ANSI
- 怎样在mshflexgrid中由行列名称确定其值?
- 在VB里的treeview里将节点的字体变粗,跟QQ游戏菜单一样,是在哪设置的?
- 请教数据库问题
- 怎么样让控件的大小随着窗体的缩放而改变?
- 一个非常弱智的问题,大家来抢分啊!!!
- 哪位朋友能帮我买[武昌]->[成都](T246,发车时间是17:25)的火车票?
- 请问怎么成批删除listBox中的项目?
- 如何实现邮件的实时监控、接收
- 高手进来,万分活鸡:在EXCEL中录制了这样一段宏,但是在VB中执行不了,难道只有用循环做?
- 请问:在VB里,打开windows下的语音控制是如何做的?是哪个函数或控件!谢谢哈
.Range("D" & 1 & ":G" & 1).Select
X1App.ActiveCell.FormulaR1C1 = "FRAMES/LENS TRACE REPORT"
X1App.Selection.MergeCells = True
With X1Sheet.Application.Selection.Font ''这里改成这样试试?
.SIZE = 18
.Bold = True
End With
End with
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open("c:\b.xls")
Set xlSheet = xlBook.Worksheets(1)
xlApp.Visible = False
With xlSheet
Range("A1:E9").Select
With Selection.Font
.Name = "宋体"
.Size = 18
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
End With
xlBook.Save
Set xlSheet = Nothing
Set xlBook = Nothing
xlApp.Quit
Set xlApp = Nothing
MsgBox "ok"
End Sub