storemannequin
Board Regular
- Joined
- May 29, 2010
- Messages
- 108
I've written this prompt to get info from the user but after the macro runs, when I go to run another report with the macro, it doesn't prompt again and the old user inputted information remains. Only when I close the whole excel application and open a new instance does it work. Is there a way to clear the information?
Code:
Private Function TimePrompt() As String
Static ans As String
If ans = Empty Then
ans = InputBox("Please specify the time period of this report:")
End If
TimePrompt = ans
End Function