Wrox Programmer Forums
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 26th, 2007, 01:14 PM
Authorized User
Join Date: Dec 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to brawny4
Default Excel Worksheets

I am new to Excel VBA. A colleague of mine creates a new excel spreadsheet with multiple tabs every week. I need to go in and total and grab certain information from this workbook.

How can I create my own spreadsheet, write some VBA code to spin through each sheet and total the information I need.

Thanks in advance for your help.


Old December 28th, 2007, 05:25 PM
Registered User
Join Date: Dec 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

I am also new to vba code, but i find that using the 'record macro' function is a great place to start.

I would recommend to start recording a macro, then do all the steps required manually. Then stop the macro and look at the code, it helped me to figure out some things.

Sorry i could be of further assistence, hope this helped.

Old December 29th, 2007, 04:57 AM
Friend of Wrox
Join Date: Oct 2003
Posts: 168
Thanks: 0
Thanked 0 Times in 0 Posts


You can use For Each loop

Sub ForEachSheet()
Dim wSheet As Worksheet

For Each wSheet In Worksheets

    'Code here for every sheet
    Debug.Print wSheet.Name ' this goes to immediate window

End Sub


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create an Excel Spread with multiple worksheets hewstone999 Access VBA 1 March 7th, 2008 08:21 AM
Worksheets (tabs) paul20091968 Excel VBA 1 December 12th, 2006 04:33 AM
Splitting Excel file into Multiple Worksheets tvschalapathirao Dreamweaver (all versions) 3 May 16th, 2005 02:16 AM
Links to MS Excel Worksheets Dudester Classic ASP Basics 0 June 7th, 2003 02:08 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.