Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub servient()
Workbooks("OpenFile1.xls").Sheets("Sheet2").Range( "A1").Value = "first Option" End Sub -- Gary''s Student - gsnu200822 "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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Writing to a .txt File | Excel Programming | |||
writing to a DB4 file | Excel Programming | |||
Writing a CSV file | Excel Programming | |||
Writing a .txt file | Excel Programming | |||
file writing | Excel Programming |