Solved

Need dialog box to set path in program

Posted on 2015-01-11
2
75 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
[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
  • 2
2 Comments
 
LVL 47

Expert Comment

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

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
Computer crashes, following error message in event manager 5 315
TT Auto Dashboard 13 104
Advice in Xamarin 21 118
SQL Server 2012 to SQL Server 2016 24 53
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

738 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