I need VBA Assistance for evaluating words in a filename

G

Guest

Good afternoon,

I am using an Access module and need to know a VBA command that can evaluate
a filename and determine which month is in the filename. For instance, if
filename is Executive Summary February 2005.xls, I need to pull out
'February' . Thanks.

I also am using this module to control Excel as well. I am using an object
variable named OBJ declared as an Excel Application. I use this object
variable to call certain Excel macros, but I need to know if there is a way
to pass a variable that I obtain from an Access user form, and then run Excel
macros based on that input. What would be the syntax to use in my Acess
module to pass variable, or so that my Excel macros can input the Access
variable as a parameter? Thanks.
 
K

Ken Snell [MVP]

You'll need to write code that "knows" the 12 month names, and then that
uses InStr function to find one of those names in the filename.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top