Syntax

expression.Interactive

expression A variable that represents an Application object.

Remarks

Blocking user input will prevent the user from interfering with the macro as it moves or activates Microsoft Excel objects.

This property is useful if you're using DDE or OLE Automation to communicate with Microsoft Excel from another application.

If you set this property to False, don't forget to set it back to True. Microsoft Excel won't automatically set this property back to True when your macro stops running.

Example

This example sets the Interactive property to False while it's using DDE in Windows and then sets this property back to True when it's finished. This prevents the user from interfering with the macro.

Visual Basic for Applications
Application.Interactive = False Application.DisplayAlerts = False channelNumber = Application.DDEInitiate( _ app:="WinWord", _ topic:="C:\WINWORD\FORMLETR.DOC") Application.DDEExecute channelNumber, "[FILEPRINT]" Application.DDETerminate channelNumber Application.DisplayAlerts = True Application.Interactive = True
Block input while macro is executing? Interactive Interactive Property Lock out user from interfering with ole automation? Prevent interaction with program during dde transmissions?

See also: