Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Recent Files Menu List

Posted on 1999-06-26
5
Medium Priority
?
205 Views
Last Modified: 2010-05-02
I've asked this before but have been unable to make anything work yet.

I've made an editor and I want to display the 4 most recently used files in the file menu.

0
Comment
Question by:mkill22
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 5

Expert Comment

by:KDivad
ID: 1519936
Something like the following should work for you. Set the four menu item's visible property to false. Check for your recent files wherever you wish to store them. As you find each one, change the visible properties to true. Arrays
would work much better in this case.

With 4 menu items named menuRecentFile(0) through menuRecentFile(3) and an array named and dim-med RecentFile(0 to 3), use code like the following:

Sub Form_Load ()

For I = 0 to 3
If (check for file number I) then
menuRecentFile(I).Visible = True
RecentFile(I) = (name of recent file)
Next
...
...
End Sub
0
 
LVL 7

Expert Comment

by:Inteqam
ID: 1519937
0
 
LVL 1

Author Comment

by:mkill22
ID: 1519938
Obviously this didn't work for me or I would not be asking again.
0
 
LVL 2

Accepted Solution

by:
s_lavie earned 40 total points
ID: 1519939
Use the GetAllSettings Function

Example:

This example first uses the SaveSetting statement to make entries in the Windows registry (or .ini file on 16-bit Windows platforms) for the application specified as appname, then uses the GetAllSettings function to display the settings. Note that application names and section names can't be retrieved with GetAllSettings. Finally, the DeleteSetting statement removes the application's entries.

' Variant to hold 2-dimensional array returned by GetAllSettings
' Integer to hold counter.
Dim MySettings As Variant, intSettings As Integer
' Place some settings in the registry.
SaveSetting appname := "MyApp", section := "Startup", _
key := "Top", setting := 75
SaveSetting "MyApp","Startup", "Left", 50
' Retrieve the settings.
MySettings = GetAllSettings(appname := "MyApp", section := "Startup")
      For intSettings = LBound(MySettings, 1) To UBound(MySettings, 1)

            Debug.Print MySettings(intSettings, 0), MySettings(intSettings, 1)
      Next intSettings
DeleteSetting "MyApp", "Startup"




0
 
LVL 7

Expert Comment

by:Inteqam
ID: 1519940
mmmmmmm...........

sorry , i didn't know it is your question

:o)

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question