Solved

Code to get folder name crashes 64-bit Excel 2013 in Windows 8.1

Posted on 2014-11-28
3
333 Views
Last Modified: 2014-11-28
The basic code in the attached file has worked perfectly for years to return a selected folder name. However, it crashes the 64-bit version of Excel 2013 in Windows 8.1.  Any ideas on how to resolve?
GetFolder-test.xls
0
Comment
Question by:bishop3000
  • 2
3 Comments
 
LVL 26

Accepted Solution

by:
Nick67 earned 500 total points
Comment Utility
I'll go sideways.
That sure is a passel of API code to do stuff you don't need API for.
Have a look at the button and code in the returned sample
Why use API when you've got VBA objects to do the job?
GetFolder-test.xls
0
 

Author Closing Comment

by:bishop3000
Comment Utility
Works great, thank you!
0
 
LVL 26

Expert Comment

by:Nick67
Comment Utility
The file dialog has a .InitialFileName property
You can aim the dialog to open in a specific spot if so desired.
It will open to 'My Documents' if no default is specified.

Nick67
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
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…
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…
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…

744 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

17 Experts available now in Live!

Get 1:1 Help Now