convert cell content to filename

  • Thread starter Thread starter jnrw
  • Start date Start date
J

jnrw

I have spreadsheets generated daily with respective dates. I am able to
create their names in another spreadsheet in a cell. How do I use this
cell content as filename to open respective file? I appreciate any
tips. Thank you.
Nicole
 
Nicole,

You can select the cell where you have the name of the file, go to the menu
INSERT | HYPERLINK or Ctrl + K and select the path and the file that you
would like to open.

hope it helps
regards from Brazil
Marcelo

"(e-mail address removed)" escreveu:
 
To carry this idea one step forward: I have *.txt datafiles created each day
from a data logging system, incorporating the date into the name. I want to
use a calendar control to pick a date for a record to retrieve. The calendar
control enters the requested date into a cell on the spreadsheet. Using a
combination of YEAR(), MONTH(), DAY() and string concatenation functions, I
can re-create the file name.
For example, to create the file name for June 1, 2006, use the calendar
control to enter "10/20/06" into cell A1. Then use MONTH(A1) to get "10" for
October, DAY(A1) to get "10" for the day, and RIGHT(YEAR(A1),2) to get "06"
for the year. Next, I use ="SU"&A2&A3&A4&".TXT" to re-create the original
data file name, "SU102006.TXT". How do I code VBE to take that file name,
insert it as the "FileName" property in a macro to get external data?
 

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

Back
Top