+ Reply to Thread
Results 1 to 2 of 2

Run time error '6' , Overflow

  1. #1
    Registered User
    Join Date
    MS-Off Ver

    Run time error '6' , Overflow


    I'm running below VBA code and getting overflow error. Please help


    Sub Clear_Sheet()
    Application.ScreenUpdating = False
    Dim msg As Integer
    Dim LastRow1 As Integer
    Dim LastRow As Integer
    Sheets("Consolidated Data").Select
    'On Error Resume Next

    LastRow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row // Error at this line/////

    If WorksheetFunction.CountA(Range("A2:Q1048576")) > 0 Then

    Range("A2:Q" & LastRow).Select
    msg = MsgBox("Old Data Cleared from Consolidation sheet", vbOKOnly, "Success! Consolidation Report")

    msg = MsgBox("No Data to Delete in Consolidaton sheet", vbInformation, "Consolidation Report")
    End Sub


  2. #2
    Forum Moderator Fotis1991's Avatar
    Join Date
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010

    Re: Run time error '6' , Overflow

    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.

    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)


    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ 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. Run-time error '6': Overflow HELP!
    By Nils88 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2013, 06:46 AM
  2. [SOLVED] Run-Time error 6 'Overflow'
    By guatelize in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-20-2012, 07:08 AM
  3. [SOLVED] Run-time error '6': Overflow
    By msawyer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-14-2012, 01:29 PM
  4. Run time error 6 Overflow?
    By ben5496 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-06-2011, 09:00 PM
  5. Run-time error '6': Overflow
    By magoobee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2006, 12:54 PM


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