私はあなたのコードをチェックしましたが、私には問題ないようです。
Sub TimeValueTest()
Dim shin2 As String
Dim intime22 As Double, intime2 As Double
shin2 = InputBox("Enter time in hh:mm:ss format")
If shin2 <> "" Then
intime2 = TimeValue(shin2) + TimeValue("00:30:00")
Debug.Print "intime2"
Debug.Print "value: " & intime2
Debug.Print "time: " & Format(intime2, "hh:mm:ss")
Debug.Print "----"
intime22 = TimeValue(shin2) - TimeValue("00:30:00")
Debug.Print "intime22"
Debug.Print "value: " & intime22
Debug.Print "time: " & Format(intime22, "hh:mm:ss")
End If
End Sub
入力ボックスに 05:00:00 を入力すると、以下が出力されます。
intime2
value: 0.229166666666667
time: 05:30:00
----
intime22
value: 0.1875
time: 04:30:00
ボンネットの下で TimeValue は時間文字列を 10 進数に変換するため、奇妙な結果が変数とその宣言方法に関係している可能性があると思われます。