CasewareDocs

RemoveHistoryLast

Deletes the last history rows of an IDEA database.

Compatibility

Available as of IDEA version 9.0

Syntax

RemoveHistoryLast(databaseName as String, count as Integer)

Parameters

databaseName

The name or the path of an IDEA database.

count

The number of elements to be removed.

Remarks

An error is raised if databaseName cannot be found or if the parameter is empty.

Example

Dim ProtectIP As Object 
Dim fileName As String

Sub Main
'Get the name of the database.
fileName = SmartContext.PrimaryInputFile

'Initialization
Set ProtectIP = SmartContext.MacroCommands.ProtectIP

'Delete last 5 history rows
ProtectIP.RemoveHistoryLast fileName, 5

'Release objects.
Set ProtectIP = Nothing
End Sub