Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 9th, 2004, 12:50 PM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Default file locations

Way back on 24 October, I posted a query: my program would play .WAV files if I loaded it with the Open File dialogue, but not if I opened it via the Taskpane. I got no replies.
I have now cracked the problem: it might be of general interest.
The original program was in a sub-directory of My Documents, as were the .WAV files I wanted to play.
The default file location in Excel is My Documents; however, when you navigate to a file with the Open File dialogue, this changes to wherever you end up. When the program calls for a .WAV file, it finds it.
However, if you start the workbook from the Taskpane, the default file location isn't changed: so the program was looking for the .WAV files in My Documents. Because it was an API call, there was no File Not Found error message; just silence.
You would get the same problem if your VBA program called an old-fashioned text file: in fact it was doing just this (with Word not Excel) that enlightened me.
I think this must qualify as a bug in Excel.


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Default File Name David Mulvey Word VBA 1 October 31st, 2008 04:02 PM
Cascading forms, form start locations pigparent Visual Basic 2005 Basics 3 June 27th, 2008 10:34 AM
UserForm to Save File with default name FriendlyGrizzly Excel VBA 1 June 17th, 2008 10:49 PM
One Location to Many Locations sudipkumar Biztalk 0 April 15th, 2005 08:13 AM



All times are GMT -4. The time now is 10:32 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.