+ Reply to Thread
Results 1 to 7 of 7

Calculate all reports(sheets) in a workbook?

  1. #1
    Registered User
    Join Date
    07-18-2007
    Location
    Joliet, Illinois
    Posts
    30

    Calculate all reports(sheets) in a workbook?

    This is my first attempt at posting code-I've read the instructions-hopefully I've done it right.

    I am using the code below to allow a user to calculate all financial reports in a workbook. This came from a sample file and I thought I had adjusted it to fit my needs but I am getting error messages.

    The sheets are labeled - Balance Sheet - Income Statement - Variance - Debt Service. It first hangs at the line that I have bolded in red below. None of the cell references in the code below have any formulas or information in them. Could they reference the end of each report?

    If anyone could look at this and give me advise I would appreciate it.

    Be gentle with me, I am making huge progress but am still learning. Most of it is thanks to people like all of you willing to share your expertise!!


    Please Login or Register  to view this content.
    Thank you for taking the time to help, any suggestions would be greatly appreciated......

  2. #2
    Forum Contributor stevebriz's Avatar
    Join Date
    09-07-2006
    Location
    Santiago Chile
    Posts
    389
    sorry can't see the line in red...can you please post the line of code?
    VBA - The Power Behind the Grid

    Posting a sample of your workbook makes it easier to look at the Issue.

  3. #3
    Registered User
    Join Date
    07-18-2007
    Location
    Joliet, Illinois
    Posts
    30
    It is the third line:

    Range("Values").Select

    I don't know if it will error out anywhere else.

  4. #4
    Forum Contributor stevebriz's Avatar
    Join Date
    09-07-2006
    Location
    Santiago Chile
    Posts
    389
    Have you a named range called "values" set?
    Maybe you can post a sample ( with dummy data of course )of your workbook ..that was it will be easier to see what is happening....

  5. #5
    Registered User
    Join Date
    07-18-2007
    Location
    Joliet, Illinois
    Posts
    30
    I've scaled down the file tremendously - I hope it makes sense. I had trouble getting below the file size rule.

    It would normally have five sheets but I think you get the idea.

    Thanks for helping with this.
    Attached Files Attached Files

  6. #6
    Forum Contributor stevebriz's Avatar
    Join Date
    09-07-2006
    Location
    Santiago Chile
    Posts
    389
    Ok.the problem is you do not have a defined range for "values" in any of you sheets .
    Eg: select the range of values on each sheet and then go insert>Name> define and then give the name the range eg:"values"

    I see in your code the defined range name "Values" is being asked for on different sheets.
    you need different names for different ranges.

    Once you do this you macro should run...but I cannot be sure it if will do everything or any of want you want....as I am noce clear on excatly the steps you want done in maniuplating /calculating the sheets.

  7. #7
    Registered User
    Join Date
    07-18-2007
    Location
    Joliet, Illinois
    Posts
    30
    I understand what you are saying concerning the Named ranges. I use them in alot of my formulas. I will try and re-write this code and hopefully make it work. I think it would make more sense to anyone if I were able to post all of the pieces to the workbook.

    Why would you name a range rather than just tell it to run all of the formulas on the sheet? Is there a "cheat-sheet" or glossary of terms used in writing code?

    I am anxious to give it a try and see what I can do. It may take me a day or two but I will post back with any successes or failures.

    Thank you for all of your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1