Wildcard

R

Robert

Hello,

Through a macro statement I want to open an excel sheet from a pre
defined folder. As this folder always contains only one sheet (names
differ though) I was wondering if I can give add a wildcard to the
path.

For example something like:
Workbooks.Open Filename:= _
"H:\Risk_Management\Special_Review\Upload_files\*.xls"


Thanx a lot for your help and time.

Rgds,
Robert
 
B

Bob Phillips

Use something like

sFilename = dir("H:\Risk_Management\Special_Review\Upload_files\*.xls"
Workbooks.Open Filename:= sFilename

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)
 

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