Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8361013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:36:25+00:00 2026-06-09T11:36:25+00:00

I have a workbook with several sheets with tables on them. I want to

  • 0

I have a workbook with several sheets with tables on them. I want to aggregate all the rows from the sheets onto the main table in the first. I would like it to be dynamic, so that when I add a row to one of the other sheets, it adds the row to the main table. Here is the code for my Sub:

Public Sub AggregateIssues() 
    For pgNum = 1 To ActiveWorkbook.Sheets.Count
        If ActiveWorkbook.Sheets(pgNum).Name = "Main" Then

          currSheet = ActiveWorkbook.Sheets(pgNum) 'Get Sheet
          flag = True
          RowIndex = 0
          While currSheet.Tables(0).Rows(RowIndex).Cells(0).Text = Null Or currSheet.Tables(0).Rows(RowIndex).Cells(0).Text = ""

            Row = currSheet.Tables(0).Rows(RowIndex)
            ActiveWorkbook.Sheets("Main").Tables("MainTbl").Append (Row)
            RowIndex = RowIndex + 1
          Next
        End If
    Next pgNum
End Sub

Currently, I am getting a compile error: Sub or function is not defined. The error is thrown on the name of the sub. This is the definition. Of course it is not defined yet. Any ideas on why this is happening?

Note: I believe the error is actually be caused by the continue keyword. Is there a continue keyword in VBA?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T11:36:26+00:00Added an answer on June 9, 2026 at 11:36 am

    continue is not used in VBA – you can instead wrap that if around the code in the main loop.

    break is not a VBA statement either – you probably want Exit in place of that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several sparsely populated tables in an Excel workbook from which I need
I have an Excel Workbook that has several worksheets in it. The tables in
I have a couple thousand rows in a workbook. There are several hundred rows
I have a workbook with several sheets. I have dates on the sheets that
I am copying several worksheets from one workbook to another. The first sheet contains
I have an excel workbook which needs to query data from an HTTP server.
I have an Excel workbook that I want to use as a template. It
I have a workbook with sheets having names: Student (1), Student (2), Student (3)
I have an Excel sheet where several rows are grouped together using Group and
I have an Excel 2010 macro application that is made up of several workbook

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.