473,765 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Use wildcard features in VBA code (Macro) to locate file in Windows Explorer

34 New Member
Hello,

I have built a macro to automatically go to a specific directory and a specific folder, however the names of the files I need to automatically locate change names every month.

I.e. - I hit the macro button and I'd like to automatically open a (pdf,xls,doc) file:

"C:\Matt\Files\ Pricing\Reports \GrossMargin\9279RebateDetai l.xls"

The only part of the file name that changes every month are the first four numbers before "RebateDeta il", and it's the only file with that name in the folder.

Can anyone assist with the code needed to automatically open the "RebateDeta il" file, regardless of the preceeding four digits?

Thank you!

Matt
Apr 4 '08 #1
2 3074
Dököll
2,364 Recognized Expert Top Contributor
Hello,

I have built a macro to automatically go to a specific directory and a specific folder, however the names of the files I need to automatically locate change names every month.

I.e. - I hit the macro button and I'd like to automatically open a (pdf,xls,doc) file:
...

Thank you!

Matt
Greetings, deve8ore!

Has to be annoying trying to figure this out. I will send over to the Access forum for a proper response. Sorry I am not too comfortable in Macros:-)

See you soon!

Dököll
Apr 4 '08 #2
deve8ore
34 New Member
Greetings, deve8ore!

Has to be annoying trying to figure this out. I will send over to the Access forum for a proper response. Sorry I am not too comfortable in Macros:-)

See you soon!

Dököll
--------------------------

Thanks much, it is appreciated!
Apr 5 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

45
4387
by: Philipp Lenssen | last post by:
There's this page requesting people to add their wishes for IE7. <http://channel9.msdn.com/wiki/default.aspx/Channel9.InternetExplorerFea tureRequests> "If you have to ask..." I mean what more do we want but W3C standards etc.? -- Google Blogoscoped http://blog.outer-court.com
4
6166
by: mvivar | last post by:
Hi everybody: This will be not easy to explain as my mother language is not english, so my apologies in advance if it sounds confusing. We have a database access 97 wich controls time of people in their job in order to finally know how many money costs us to run some projects. People always estimates the time when reporting and we do have the impression they really underestimate the time.
2
2143
by: Ken Yee | last post by:
First a little background: I've written an httphandler to handle wildcard extensions (i.e., I want to handle all URLs that come in rather than just URLs w/ a specific file extension so I can give friendly names to various dynamic web pages). To do this, I've written an httphandler and put it in the web.config for my webapp (stored in the wwwroot\webapp directory). It works great for the most part; I get to handle any URLs below my webapp...
5
4282
by: Fredrik Melin | last post by:
2005 uses the Partial Class & <form>.Designer.vb for its "windows forms generated code" Anyone know if its faster/better then old 2003 way? Also, when upgrading a 2003 project it did not change that, it left it the "old way", is there a easy way to split them up or do I have to do it manually If I want to do it? Regards
4
26818
by: CliffKing | last post by:
I am trying to use Windows Task Scheduler to run a batch file for an already open MS Access database. Below is the syntax to the batch file: Batch file: DailySalesExport.bat REM This runs the macro that exports the reports to the J drive PATH = "C:\Program Files\Microsoft Office\Office\;C:\Windows\Command" START /WAIT Msaccess.exe "D:\acesdata\SALES\Daily2005.mdb" /x "SnapShotExportDailySales" EXIT
0
1414
by: Thomas | last post by:
in .net 1.1 we successfully use a HttpModule to catch 404 / 403.1 html errors. after migrating to .net 2.0, this modules is broken in a very, very strange way. we have defined a wildcard applicatio mapping to the .net 2.0 isapi dll: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll with "check if file exists" disabled. the HttpModule "RedirectMissing" is called upon every request to the
3
1886
by: deve8ore | last post by:
Hello, I have built a macro to automatically go to a specific directory and a specific folder, however the names of the files I need to automatically locate change names every month. I.e. - I hit the macro button and I'd like to automatically open a (pdf,xls,doc) file: "C:\Matt\Files\Pricing\Reports\GrossMargin\9279RebateDetail.xls" The only part of the file name that changes every month are the first four numbers before...
0
1400
by: deve8ore | last post by:
Hi.... I'm getting closer to understanding the wildcard function in VBA, however we have a vendor that will supply us many files, and unfortunately will place them in different folders with no uniformity. I'd like to have the capability to find the file based on name, whether it's in a main folder, or one of the subfolders. I.e. - File named "*Net Rebate*" will be in and of the following folders: Main Folder Subfolder 1 ...
4
14399
NeoPa
by: NeoPa | last post by:
Introduction: Macro Security Levels in MS Office applications are recommended to be set to High. This stops any VBA code associated with a project from running, unless it is signed (with a certificate). A trusted signature will allow the code to run normally, whereas an un-trusted one will prompt the user either to trust the issuing CA (Certificate Authority) and enable the code, or simply to disable the code. This is all very well, but...
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10156
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8831
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5275
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5419
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.