Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jim
Works a treat, thanks. I still wish I knew why I couldn't OPEN the template instead of creating a NEW FILE based on it, but at least I have a workaround. Ian "Ian" wrote in message ... Thanks, Jim. I've not tested this yet, but it looks like it'll do what I need. I should be able to loop through the open workbooks until I find a match with the partial filename I have, then activate the matched workbook. Ian "Jim Thomlinson" wrote in message ... Something like this will give you the names of all open workbooks... Sub Test dim wbk as workbook for each wbk in workbooks msgbox wbk.name next wbk end sub -- HTH... Jim Thomlinson "Ian" wrote: I've tried, and failed, to successfully open a template as an xlt file (rather than xls) so I'm trying a different method to achieve what I need. My problem is this. Having opened a couple of files, I want to activate a specific one. Based on template filename.xlt, the workbook _should_ be filename1.xls, but this is not necessarily going to be the case. How can I determine the filename of the open file? I can't use Dir as the file hasn't been saved at this point. Any ideas? Ian |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel wants to save an open file to another filename in VBA script | Excel Programming | |||
Open File based on filename in cell | Excel Programming | |||
Open file with unknown extra characters at end of filename | Excel Programming | |||
Macro to read filename in cell and open new file | Excel Programming | |||
Why doesn't the File Open list sort into filename order? | New Users to Excel |