試圖在我的PPT內VBA第一次去,在Excel中做了一些前..但我需要在那裏與這一個去一些幫助......的PowerPoint(VBA?)淡入淡出文本
我有一百個左右的字符串的列表,我想淡入淡出,在同一張幻燈片上,大約3或者每秒鐘顯示1次。並繼續這樣做直到用戶停止,即CTRL + break。我有一個小的編碼,到目前爲止,但不知道從哪裏何去何從......
Option Explicit
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub Test()
'Start the presentation
ActivePresentation.SlideShowSettings.Run
'Change the value of the text box to String1 and fade in the text
ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange.Text = "String1"
DoEvents
'Wait 2 secounds, fade out the Hello! Sting
Sleep 2000
'Fade in the new string.. String2!
ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange.Text = "String2"
DoEvents
'A Loop to keep going back and forth between the 2 (there will be many more later....
'Until stoped by the user [CTRL + BREAK]
End Sub
Option Explicit
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub Test()
'Start the presentation
ActivePresentation.SlideShowSettings.Run
'Change the value of the text box to String1 and fade in the text
ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange.Text = "String1"
DoEvents
'Wait 2 secounds, fade out the Hello! Sting
Sleep 2000
'Fade in the new string.. String2!
ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange.Text = "String2"
DoEvents
'A Loop to keep going back and forth between the 2 (there will be many more later....
'Until stoped by the user [CTRL + BREAK]
End Sub
我非常感謝所有幫助論壇/人能提供..謝謝!
Skyhawk
你只需要每個模塊`選項Explicit`一次。 – TheEngineer 2016-06-27 17:01:39