Solved

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

Posted on 2014-11-28
3
346 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
ID: 40471096
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
ID: 40471101
Works great, thank you!
0
 
LVL 26

Expert Comment

by:Nick67
ID: 40471104
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

789 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