如何用宏实现Excel两个sheet之间的定时切换?
如打开一个Excel表格,启用宏!让sheet1和sheet2每隔5分钟切换一次!请问如何实现?
[解决办法]
1、Thisworkbook
Private Sub Workbook_Open()
Application.OnTime Now() + TimeValue( "00:05:00 "), "ShowMe "
End Sub
2、模块
Sub Showme()
If ActiveSheet.Name <> Sheet1.Name Then
Sheet1.Activate
Else
Sheet2.Activate
End If
End Sub