| | タイトル | : VB6.0でExcelのセルのフォントを変更 |  | 記事No | : 12211 |  | 投稿日 | : 2008/05/08(Thu) 00:29 |  | 投稿者 | : べた | 
 VB6.0でExcelのセルの書式のフォントの設定です。
 フォント、サイズ、スタイルなどを変更したいのですが、
 
 その1
 
 xlSheet.Cells.NumberFormat = "@"
 xlSheet.Cells(1, 1).Font.Name = "MS 明朝"
 xlSheet.Cells(1, 1).Font.Size = 16
 xlSheet.Cells(1, 1).Font.FontStyle = "太字"
 
 と
 
 その2
 
 xlSheet.Cells.NumberFormat = "@"
 xlSheet.Cells(1, 1).Font.Name = "MS 明朝"
 xlSheet.Cells(1, 1).Font.Size = 16
 xlSheet.Cells(1, 1).Font.Bold = True
 xlSheet.Cells(1, 1).Font.Italic = True
 
 と、どちらが良いのでしょうか。
 または、書き方が全然違うのでしょうか。
 
 1と2でもエラーなどは発生せず、一応は動きました。
 
 環境は、
 Windows2000
 VB 6.0
 Excel 2003
 です。
 
 |