I have a macro that calculates a sheet, waits 1 second, then does it again. After 12 seconds, it switches to the next sheet and does the same thing. I'd like the macro to run certain number of times, based on the value of a cell that the end user inputs into a box. I've minimal experience with writting VBA, so I'd appreciate some help. Here is my code (without the repeats every second, I can fix that once I've gotten the looping working)
Sub TreeTwinkle()
'
' TreeTwinkle Macro
'
Dim myValue As Integer
myValue = InputBox("How many minutes should this run?")
Range("da1").Value = myValue
ActiveSheet.Calculate
Application.Wait Now + #12:00:01 AM#
Sheets("Menorah").Select
ActiveSheet.Calculate
Application.Wait Now + #12:00:01 AM#
Sheets("Cresant").Select
ActiveSheet.Calculate
Application.Wait Now + #12:00:01 AM#
Sheets("Snowflake").Select
ActiveSheet.Calculate
Application.Wait Now + #12:00:01 AM#
Sheets("Khanda").Select
ActiveSheet.Calculate
Application.Wait Now + #12:00:01 AM#
Sheets("Tree").Select
ActiveSheet.Calculate
End Sub