Recent File Properties

Name

Returns

Description

Index

Long

Read-only. Returns the spot in the collection where the current object is located

Name

String

Read-only. Returns the name of the recently modified file

Path

String

Read-only. Returns the file path of the recently modified file

RecentFile Methods

Name

Returns

Description

Delete

Deletes the object from the collection

Open

Workbook

Opens up the recent file and returns the opened workbook

RecentFile Object and the RecentFiles Collection Example

Sub CheckRecentFiles() Dim oRF As RecentFile

'Remove any recent files that refer to the floppy drive For Each oRF In Application.RecentFiles If Left(oRF.Path, 2) = "A:" Then oRF.Delete

Sub CheckRecentFiles() Dim oRF As RecentFile

'Remove any recent files that refer to the floppy drive For Each oRF In Application.RecentFiles If Left(oRF.Path, 2) = "A:" Then oRF.Delete

End If Next End Sub

0 0

Post a comment