?
Solved

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

Posted on 2014-11-28
3
Medium Priority
?
358 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
[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
3 Comments
 
LVL 26

Accepted Solution

by:
Nick67 earned 2000 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
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…

762 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