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

x
?
Solved

Need dialog box to set path in program

Posted on 2015-01-11
2
Medium Priority
?
79 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 49

Expert Comment

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

Accepted Solution

by:
Martin Liss earned 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Suggested Courses

670 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