+ Reply to Thread
Results 1 to 3 of 3

run time error 9: script out of range?

  1. #1
    Registered User
    Join Date
    07-28-2014
    Location
    delhi
    MS-Off Ver
    2010
    Posts
    0

    Lightbulb run time error 9: script out of range?

    its working fine with ms offce 2003, but when i try it with office 2010, it gives error:
    run time error 9: script out of range?

    vb code is :::::

    Private Sub CommandButton1_Click()
    Dim i As Long, j As Long
    For i = 0 To Me.ListBox1.ListCount - 1
    If Me.ListBox1.Selected(i) Then
    j = j + 1
    Worksheets("Sheet1").Range("A" & i + 2).Resize(1, 6).Copy Worksheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)
    End If
    Next i
    MsgBox j & " Rows Copied To Sheet 2 - Have a look if you dont beleive me"
    End Sub



    Private Sub UserForm_Initialize()
    With Worksheets("Sheet1")
    Me.ListBox1.RowSource = .Range("A2", .Range("A" & Rows.Count).End(xlUp).Offset(1, 6)).Address(External:=True)
    End With
    End Sub


    Please help me !!!!!!

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166
    Hello sanjayrshn.hzb,

    Welcome to Excelforum. Be a part of large Excel community. Enjoy Learning.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,705

    Re: run time error 9: script out of range?

    This is the Introduction Forum where no questions should be posted. If you start a thread in any of the other sub-forums, I´m sure it will not take long before your request will be solved there.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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] Run Time Error 9 " Script out of range
    By vaibhav2312 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-10-2013, 08:10 AM
  2. getting an error- a script out of range - Join function
    By AB33 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2012, 01:29 PM
  3. Script Out Of Range Error at Logon
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-28-2009, 05:52 PM
  4. Course Bookings Run-time error '9': Script out of range
    By tomsmart@smart- in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-18-2008, 10:45 PM
  5. Script out of range error
    By michele@quality-computing.com in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-24-2005, 05:06 PM

Tags for this Thread

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