View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
dennis dennis is offline
external usenet poster
 
Posts: 202
Default Controlling Excel From Access

xlApp is a reference to the currently opened Excel workbook and xlWS is the
reference to the new sheet you have added

xlWS.Move After:=xlApp.Worksheets(xlApp.Worksheets.Count)

"Keith Wilby" wrote:

I have an Access app that creates a new worksheet in the workbook chosen by
the user via a dialog box. I would like the new worksheet to appear at the
end of the existing collection of worksheets. Would anyone happen to know
the syntax for getting a count of sheets in the current workbook and using
that count to place the new sheet at the end?

Many thanks.

Keith.