Solved

Need dialog box to set path in program

Posted on 2015-01-11
2
73 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 46

Expert Comment

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

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Hide vba in gp 7 95
Added a column screws up code 5 57
how to know if my Checkbox is True in VB6.0? 9 55
Problem to With line 4 57
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

773 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