Kentetsu
Well-known Member
- Joined
- Jan 22, 2004
- Messages
- 520
Hi all,
I'm attempting to reuse strTime as the variable for Application.Wait but I'm getting a "Type Mismatch" when it gets to that point. Any idea on how to make this work?
I'm attempting to reuse strTime as the variable for Application.Wait but I'm getting a "Type Mismatch" when it gets to that point. Any idea on how to make this work?
Rich (BB code):
Dim strMsg As String
Dim strTime As String
'-------------------------------------------------------------------------------------------------------------------------------
If Sheets("Scrap").Range("E13").Value = "End" Then
Call EndSession
strMsg = _
"Your 1st Ingredient(s) = @2ING@1@1And will mix for: @time Minutes. @1@1 Add the ingredient(s), THEN Click OK to Begin Timing"
With Sheets("Scrap")
strTime = .Cells(14, 5).Text
strMsg = Replace(strMsg, "@2ING", .Cells(13, 5).Value)
strMsg = Replace(strMsg, @time", strTime)
MsgBox Replace(strMsg, "@1", vbCrLf), vbOKOnly, "First Ingredient(s)"
End With
Sheets("Stop").Visible = True
Sheets("Go").Visible = xlVeryHidden
Application.Wait (Now + TimeValue(strTime))
Sheets("Go").Visible = True
Sheets("Stop").Visible = xlVeryHidden
End If