+ Reply to Thread
Results 1 to 4 of 4

Runtime error "6" Overflow

  1. #1
    Registered User
    Join Date
    02-28-2014
    Location
    Dubai
    MS-Off Ver
    Excel 2013
    Posts
    19

    Post Runtime error "6" Overflow

    Hi guys
    i am new to the VB and i need your help to sort out the below problem

    Im using below simple code by passing these values 898098878(param1) 7768978989(param2) and unfortunately getting the this error RUNTIME ERROR "6" Overflow.


    Private Sub CommandButton5_Click()
    Dim param1 As Long
    Dim param2 As Long

    param1 = gross.Text
    param2 = eprem.Text

    TextBox2 = Format((param1& / param2&), "0.00%")
    TextBox1 = param1& + param2&

    End Sub

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: Runtime error "6" Overflow

    Hi crimzon,

    Welcome to the forum!!

    You need to wrap your code with the appropriate tags as I have with this suggested solution:

    Please Login or Register  to view this content.
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Runtime error "6" Overflow

    Cross-posted at http://www.mrexcel.com/forum/excel-q...-overflow.html
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    02-28-2014
    Location
    Dubai
    MS-Off Ver
    Excel 2013
    Posts
    19

    Re: Runtime error "6" Overflow

    Quote Originally Posted by shg View Post
    I am sorry for cross-posted.
    i was very sleepy in the midnight when i posted.

+ 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. [SOLVED] Excel VBA Runtime error '1004' "If WorksheetFunction.Find" function
    By miguelitoven in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-11-2013, 04:34 PM
  2. Vlook up VBA Error when value not found "runtime error -1004"
    By sriram170 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-06-2013, 01:14 PM
  3. Worksheets("NamedRange").ShowAllData Runtime error in 2007 but not 03
    By TKshelton in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-09-2010, 12:12 PM
  4. [SOLVED] "Microsoft Visual Basic runtime error '424' object required".
    By SharonG. in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-04-2006, 08:40 PM
  5. [SOLVED] Merged cells cause "Runtime error 13 type mismatch" problem
    By Ralph Malph in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2006, 08:55 AM

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