Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Broken under Windows 10?

Status
Not open for further replies.

davidbeach

Electrical
Mar 13, 2003
9,471
US
Just starting to get my feet wet with Windows 10. One VBA routing I have been using since XP includes the line:
Code:
PathFile = Application.GetOpenFilename("AcSELerator Export Files (*.txt), *.txt")
That has always produced a file open dialog box and returned a string with the path and file name of the selected file. Trying this evening for the first time under windows 10 (64 bit, everything previously has been 32 bit, if that matters), and execution halts after I select a file name in the dialog box.

Anybody have any ideas why code that never caused problems under XP and 7 now fails, without warning or error, under 10?
 
Replies continue below

Recommended for you

What program are you trying to run this line of code in?

-handleman, CSWP (The new, easy test)
 
I'ma guess Excel. I'm running 64 bit Excel 2016 on Win10 pro 64 bit. That line of code works just fine for me, returns the selected file path.

-handleman, CSWP (The new, easy test)
 
Excel 2010. I have similar code in a different VBA program that works just fine on the same machine. Puzzling.
 
Never mind; bad debugging. The routine was correctly getting the pathfile name and then not finding a route through a select case structure. Oops. [blush]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top