Solved

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

Posted on 2014-11-28
3
338 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

914 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