Consulting

Results 1 to 2 of 2

Thread: overflow runtime error

  1. #1
    VBAX Regular
    Joined
    Apr 2010
    Posts
    39
    Location

    Talking overflow runtime error

    hi, all. during a run my macro, it occurs Run-time error '6': Overflow . Not sure where is the problem.
    Function ASPformula()
    Dim Str1 As String
    Dim ERow As Integer
    
    Sheets("PreOverall").Select
    'Insert ASP formula at subtotal level
    ActiveSheet.Outline.ShowLevels RowLevels:=1
    Rows("7").Select
    range(selection, selection.End(xlDown)).Select
    ERow = selection.Rows.Count +6    "the error msg occurs in this step"
    sorry cannot upload the example file as this is an company confidential information. Can anyone just give a suggestions???
    Thank you!

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    Function ASPformula()
    Dim Str1 As String
    Dim ERow As Long

    Sheets("PreOverall").Select
    'Insert ASP formula at subtotal level
    ActiveSheet.Outline.ShowLevels RowLevels:=1
    Rows("7").Select
    range(selection, selection.End(xlDown)).Select
    ERow = selection.Rows.Count +6 "the error msg occurs in this step"
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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