Solved

Need dialog box to set path in program

Posted on 2015-01-11
2
71 Views
Last Modified: 2015-01-12
I have three forms in the attached project named frmallowed.frm and frmblocked.frm and BlockList.frm   Essentially these forms access files to populate an MSFlexGrid.  Two forms are identical except for the file and folder locations they access.   I need a dialog box to set the location of all three of these forms.  I was thinking that in the menu, I could set these 3 path locations in a separate text file called paths.txt and then the program would be set.

In frmallowed.frm I need a dialog box that will set the location for the allowed.txt file.  I have comments by the needed line.

In frmblocked.frm I need a dialog box that will set the location for the blocked-custom.txt file   I have comments by the needed line.

In BlockList.frm I need a dialog box that will set the location for the DailyLogs folder    I have comments by the needed line.

How can I setup a dialog box as an example?
CB.zip
0
Comment
Question by:al4629740
  • 2
2 Comments
 
LVL 45

Expert Comment

by:Martin Liss
ID: 40543670
Let me take a look.
0
 
LVL 45

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 40543675
Add a Microsoft Common Dialog control toe the form and then do something like this.

CommonDialog1.DialogTitle = "Open File"
CommonDialog1.Filter = "*.*"
CommonDialog1.FilterIndex = 1
CommonDialog1.Flags = cdlOFNAllowMultiselect + cdlOFNExplorer
CommonDialog1.Flags = cdlOFNFileMustExist + cdlOFNHideReadOnly
CommonDialog1.CancelError = True
On Error Resume Next
CommonDialog1.ShowOpen

Open in new window

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now