次のコードがあります。ただし、セルで見つかったのは、出力 (つまり SEP08) がセル内で Sep-08 に変換されていることです。SEP08 を日付形式なしで Excel スプレッドシートにそのまま表示するにはどうすればよいですか?
Dim StartMonth As String
Select Case Month(EarliestDate)
Case "1"
StartMonth = "JAN" & Right(Year(EarliestDate), 2)
Case "2"
StartMonth = "FEB" & Right(Year(EarliestDate), 2)
Case "3"
StartMonth = "MAR" & Right(Year(EarliestDate), 2)
Case "4"
StartMonth = "APR" & Right(Year(EarliestDate), 2)
Case "5"
StartMonth = "MAY" & Right(Year(EarliestDate), 2)
Case "6"
StartMonth = "JUN" & Right(Year(EarliestDate), 2)
Case "7"
StartMonth = "JUL" & Right(Year(EarliestDate), 2)
Case "8"
StartMonth = "AUG" & Right(Year(EarliestDate), 2)
Case "9"
StartMonth = "SEP" & Right(Year(EarliestDate), 2)
Case "10"
StartMonth = "OCT" & Right(Year(EarliestDate), 2)
Case "11"
StartMonth = "NOV" & Right(Year(EarliestDate), 2)
Case "12"
StartMonth = "DEC" & Right(Year(EarliestDate), 2)
End Select
ActiveCell.FormulaR1C1 = StartMonth