View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default activating a workbook

i put your formula in A1 and this worked for me
Windows(fileA).Activate

maybe you should qualify the range with the sheet name, since i don't know what
the active sheet is

fileA =
workbooks("YourWorkbookName").worksheets("YourShee tName").Range("A1").Value

--


Gary


"VB Script for Excel" wrote in message
oups.com...
A1 in the current workbook gives me the file name that changes everyday
due to date.
A1 shows:
="pnlreport_"& TEXT(now(),"yymmdd")& ".xls"
this will produce: pnlreport_060321.xls if today's date is 21st March
2006.

I need to activate this file, which is already open through VB. But it
gives me a run time error in above code.


Thanks