|
▼ピンク 様:
以下のようでよろしいでしょうか?
「Elself s = 2 Then」でコンパイルエラー(修正候補:ステートメントの最後)が表示されてしまいます...
strBuff = Replace(strDate, "年", "/")
s = InStr(strBuff, "/")
strBuff = Replace(strBuff, "月", "/")
strBuff = Trim(StrConv(strBuff, vbNarrow)) & "01"
If s = 3 Then
strBuff = Mid(strBuff, 1, 2) + 1988 & Mid(strBuff, 3, 6)
Elself s = 2 Then
strBuff = Mid(strBuff, 1, 1) + 2018 & Mid(strBuff, 2, 6)
End If
With ActiveWorkbook.Sheets(strDate).Tab
.Color = dblColor(intI)
.TintAndShade = 0
End With
End Sub
>▼令和で困り者 さん:
>strBuff = Replace(strDate, "年", "/")
>s = InStr(strBuff, "/")
>strBuff = Replace(strBuff, "月", "/")
>strBuff = Trim(StrConv(strBuff, vbNarrow)) & "01"
>If s = 3 Then
> strBuff = Mid(strBuff, 1, 2) + 1988 & Mid(strBuff, 3, 6)
>ElseIf s = 2 Then
> strBuff = Mid(strBuff, 1, 1) + 2018 & Mid(strBuff, 2, 6)
>End If
|
|