Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Controlling Excel From Access

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
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.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Controlling Excel From Access

"Dennis" wrote in message
...
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)


Dennis, thank you, just the job.

Regards,
Keith.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Controlling Access from Excel Neily[_3_] Excel Programming 6 November 12th 05 08:20 PM
getting extra excel instance when controlling from access VBA Duane Wilson Excel Programming 2 October 14th 05 05:49 AM
Controlling Access with Excel VBA TIML Excel Programming 2 June 30th 05 11:16 PM
Access 2002 VB Module controlling Excel 2002 spreadsheet -Run-time Mblackmore Excel Programming 0 May 12th 05 07:56 PM
Controlling Access from Excel John Bigness Excel Programming 2 April 2nd 05 01:09 AM


All times are GMT +1. The time now is 03:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"