+ Reply to Thread
Results 1 to 3 of 3

Emergency! 400 error and I need to get this model done but Monday am!

  1. #1
    Registered User
    Join Date
    05-06-2018
    Location
    London
    MS-Off Ver
    2010
    Posts
    1

    Exclamation Emergency! 400 error and I need to get this model done but Monday am!

    Hey, so I'm stuck in the office over the bank holiday and my VBA wont run. I've copied it from another model and changed the names of the cells so maybe that had something to do with it (basically I added "GBP_" as a prefix). the code is below. It seems to get up to selecting and copying GBP_MacroTempcalculation but then it stops :

    Sub GBP_CalculateZeroline()

    Application.ScreenUpdating = False
    CalStartTime = Timer

    Dim MaxCount As Double
    Dim MinCount As Double
    Dim ErrorCounter As Double

    MinCount = Range("GBP_MinCount").Value
    MaxCount = Range("GBP_MaxCount").Value

    Range("GBP_MacroCumCalculation").ClearContents
    ErrorCounter = 0

    For counter = MinCount To MaxCount

    Range("GBP_ActiveCounter").Value = counter
    Calculate
    Range("GBP_MacroTempcalculation").Select
    Selection.Copy
    Range("GBP_MacroCumStart").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False

    If Range("c28").Value = False Then
    Range("GBP_ErrorStart").Offset(ErrorCounter, 0).Value = counter
    ErrorCounter = ErrorCounter + 1
    End If

    Application.StatusBar = "Calculating " & counter & " of " & MaxCount

    Next counter

    CalculationTime = Timer - CalStartTime

    Application.ScreenUpdating = True
    Application.StatusBar = False

    MsgBox "Time taken: " & Round(CalculationTime / 60, 2) & " minutes"

    End Sub

  2. #2
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,497

    Re: Emergency! 400 error and I need to get this model done but Monday am!

    if you want help fast(er) post a desensitized example of your workbook with the code
    and describe the desired outcome of the macro

    the current description is more like a quiz-question who can guess the problem..
    excel help is given best when the problem file is available for testing and debugging

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    13,000

    Re: Emergency! 400 error and I need to get this model done but Monday am!

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)


    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Ben Van Johnson

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Power Pivot Data Model Error
    By MarkZang in forum Excel General
    Replies: 0
    Last Post: 01-31-2018, 11:51 AM
  2. How to make a time period a variable for this model? (automating the model)
    By pigment01 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-17-2015, 12:47 PM
  3. Solver add-in not working - error in model
    By Coaster in forum Excel General
    Replies: 5
    Last Post: 04-27-2013, 11:49 PM
  4. Create a model that will generate a column of numbers based on model parameters
    By tncanoeguy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-01-2013, 05:47 PM
  5. EMERGENCY!! PLEASE HELP!!
    By meegan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-01-2006, 12:50 PM
  6. EMERGENCY Hyperlink within Woirksheets EMERGENCY
    By Flo in forum Excel General
    Replies: 6
    Last Post: 05-19-2006, 03:55 PM
  7. Replies: 1
    Last Post: 04-13-2005, 06:35 PM

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