View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default For all workbooks in a folder

Sorry, I didn't test it. But wbcodebook is already a workbook variable. That
means that it comes with lots of properties--in fact, it's parent is the
application.

It would be equivalent to:

workbooks("test.xls").wks.range("a1")

Wks already has a parent (the workbook it belongs to)--so you can't specify it
again.

==
An ugly alternative:
application.workbooks(wbcodebook.name).activate

but why bother.

Ctech wrote:

Application.wbCodeBook.Activate

It seams that the code works if I take away the Application. bit in the
code?
Why is this? Am I missing a references tool in excel?

--
Ctech

------------------------------------------------------------------------
Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745
View this thread: http://www.excelforum.com/showthread...hreadid=506295


--

Dave Peterson