View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
joe joe is offline
external usenet poster
 
Posts: 4
Default Reference the active sheet

If I run the following code and I have an open spreadsheet with existing
sheets, I get another instance of Excel w/no sheets. How can I reference
the active spreadsheet(w/o knowing the filename?)

Dim oXL as object
Dim xlWorksheet as object

Set oXL = GetObject("", "Excel.Application")
Set xlWorkSheet = oXL.Worksheets.Add

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!