Hi,
Im a little stuck trying to organise the below snippits of code to work.
I want the workbook to toggle beetween worksheets at a fast rate, say 0.3sec but not sure how i should be organising the code.
At the top i have the following code....
.... Now this is where im stuck, I know i need to create a loop then call the loop in beetween the change of worksheets but my online copy & paste skills are running low lol
Any suggestions or advice would be appriciated
Thanks
Pancho!
Im a little stuck trying to organise the below snippits of code to work.
I want the workbook to toggle beetween worksheets at a fast rate, say 0.3sec but not sure how i should be organising the code.
Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Cancel = True
MsgBox "Ah ah ah, you didn't say the magic word!", , "Your request has been denied!"
Workbooks("TEST.xlsm").Sheets("Trojan.exe").Select
#### REQUIRE A 0.3 SEC PAUSE #####
Workbooks("TEST.xlsm").Sheets("TrojanG.exe").Select
#### REQUIRE A 0.3 SEC PAUSE #####
Workbooks("TEST.xlsm").Sheets("Trojan.exe").Select
#### REQUIRE A 0.3 SEC PAUSE #####
Workbooks("TEST.xlsm").Sheets("TrojanG.exe").Select
Workbooks("TEST.xlsm").Sheets("Trojan.exe").Select
Workbooks("TEST.xlsm").Sheets("TrojanG.exe").Select
Workbooks("TEST.xlsm").Sheets("Trojan.exe").Select
Workbooks("TEST.xlsm").Sheets("TrojanG.exe").Select
End Sub
At the top i have the following code....
Code:
#If VBA7 Then ' Excel 2010 or later
Private Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal Milliseconds As LongPtr)
#Else ' Excel 2007 or earlier
Private Declare Sub Sleep Lib "kernel32" (ByVal Milliseconds As Long)
#End If
.... Now this is where im stuck, I know i need to create a loop then call the loop in beetween the change of worksheets but my online copy & paste skills are running low lol
Any suggestions or advice would be appriciated
Thanks
Pancho!