![]() |
|
#4
|
||||
|
||||
|
Ah. Yeah, recording the macro won't help you learn to use the file-open dialogue.
But if I just write a snippet of code for you, that probably won't help you either, because you won't understand how to plug it into the program you already have. I mean, that link I gave you had code examples; presumably you glanced at them and knew they wouldn't help because you don't know enough to adapt them to your program. I don't see how I can do any better, from that angle. The best I can do is teach you how to write it. I'm willing, but are you? If not, maybe you have a coworker who can? Let me remind myself how it works and then give you a sample or two. ....Well, maybe it's simpler than I remembered. The most basic way to use it is simply to say Code:
filename=Application.GetOpenFilename So that's the first complication: If the current directory isn't when the desired files are, your program should probably set the current directory before calling the dialogue. There are other wrinkles you can incorporate. You can set it so it displays just .xlsx files, for example. There's also a setting that lets the user select more than one file, though I gather that isn't what you need in this case. And if you need the user to point to a folder instead of a file, it requires a different dialogue. But that's the general idea. If you want to understand more than that, I'm willing to explain. But it kind of requires you to learn more VBA. Some people like that idea, some don't. Up to you; I used to sneer at people who don't want to learn, but eventually I decided that if everyone wanted to learn there'd be no one left to do the actual work, so I'm content now. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Office 2010 Can't Open Or Save Documents in My Documents Folder | trippb | Office | 1 | 07-12-2013 07:29 AM |
| Cannot open folder in Outlook | marketshare | Outlook | 0 | 03-17-2013 04:07 PM |
Set a task folder to open as default
|
ghumdinger | Outlook | 1 | 07-03-2011 05:34 AM |
Outlook slow to open folder
|
rtankersley | Outlook | 1 | 09-16-2008 05:42 AM |
| OPEN FOLDER starts a search | Gwyn | Word | 0 | 02-22-2006 06:38 AM |