View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Buffyslay Buffyslay is offline
external usenet poster
 
Posts: 40
Default tricky excel formula question

or re the sheet names - if you are using vba you could do a loop thingy
and print it to the immediate window to get the names quickly

from another post

' This procedure is a brief sample showing
' how to automate Excel.


' Remember to set a reference to the most current available
' Microsoft Excel object library.


' Declare object variables.
Dim appXl As Excel.Application
Dim wrkFile As Excel.Workbook
Dim wks As Object


' Set object variables.
Set appXl = New Excel.Application
' Open a file.
Set wrkFile = appXl.Workbooks.Open("c:\Dave.xls")


' Display Excel.
For Each wks In wrkFile.Sheets
Debug.Print wks.Name
Next wks


appXl.Visible = True
MsgBox "At this point Excel is open and displays a document." &
Chr$(13) &
_
"The following statements will close the document and then close
Excel."
' Close the file.
wrkFile.Close
' Quit Excel.
appXl.Quit


' Close the object references.
set wks = Nothing
Set wrkFile = Nothing
Set appXl = Nothing


HTH,
John Green - Excel MVP
Sydney
Australia