View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
VB Script for Excel VB Script for Excel is offline
external usenet poster
 
Posts: 19
Default activating a workbook

I need to activate a workbook through a cell reference. the workook
name is stored in cell A1 as "pnlreport_060321.xls". This name
automatically changes daily based on the date. This is how I wrote the
code to activate the workbook:

Sub import()

Dim fileA As String
fileA = Range("A1").Value
windows("fileA").Activate

End Sub

Please HELP. How would I activate a workbook which is already open. I
cannot use the file name in the code because the name changes every
day.

Thanks : )