View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Brettjg Brettjg is offline
external usenet poster
 
Posts: 295
Default Referring to a variable file name

Thanks again Bob

"Bob Phillips" wrote:

Try

Activesheet.Range("Filename_Finance").Activate

if the sheet with that range is not yet activated, you have to activate it
first.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Brettjg" wrote in message
...
With Bob Phillips help I can create a variable filename. The filename is
contained in a cell called Filename_Finance. When I try to activate the
window I can't make it work. I've tried the following code:

Windows.Range("Filename_Finance").Activate
Windows(Range("Filename_Finance")).Activate
Workbooks.Range("Filename_Finance").Activate
Workbooks(Range("Filename_Finance")).Activate

but none of these work. When using the workbooks option I was mindful to
add
the .xls.

Can someone help please?