View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Writing value to another file

workbooks("openfile1.xls").worksheets("sheet2").ra nge("a1").value _
= "First Option"

would be the typical syntax.

Steven wrote:

I have this in code:

Range("OpenFile1.xls!A1").Value = "First Option"

This writes "First Option" to Sheet1 of the file I think becuase that is the
active sheet. "OpenFile1.xls" is open.

How can I write "First Option" to "OpenFile1.xls" Sheet2 A1. I dont want to
have to actually activate the window but just write to it.

Thank you,

Steven


--

Dave Peterson