LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Iterating Through Workbook if Don't Know Sheet Names

I've got an Access database that produces an "Active Project" report.
It creates a new worksheet tab for every project we have running in
our office. I chose to give the worksheet the same name as the
project, thus allowing for easy browsing when a user opens the Excel.

Now I want to create a macro that copies the worksheet over to a
PowerPoint slide. I am using this line of code:

Worksheets("Test_Project").Range("B1:P28").CopyPic ture
Appearance:=xlPrinter, Format:=xlPicture

But notice I had to hard code "Test_Project" as the Worksheet name. I
don't want to hard code the name because our project list is always
changing.

I could use "ActiveSheet.Name", but then I would have to run the macro
on every worksheet.

Is there a way I can tell Excel to select the first worksheet
(whatever that may be called) and then go on to the second, and third
-- ignoring the tab names and caring only about the tab position?

Thanks,

Chris

 
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
View All Sheet Names in Workbook at Once Lincoln Excel Discussion (Misc queries) 2 May 7th 07 11:17 PM
Using Sheet names & Workbook names in VBA coding Colin Foster[_5_] Excel Programming 5 July 7th 06 07:04 PM
Iterating rows, calc cells in dynamic sheet robd Excel Programming 1 March 20th 06 05:37 PM
Retrieving the sheet names of another workbook Aidy[_2_] Excel Programming 1 June 25th 04 07:29 PM
Iterating through workbook capturing text Matt Giedt Excel Programming 2 February 5th 04 10:49 AM


All times are GMT +1. The time now is 03:59 AM.

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

About Us

"It's about Microsoft Excel"