Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-23-2017, 09:51 AM
NoSparks NoSparks is offline Application Defined or Object defined error Windows 7 64bit Application Defined or Object defined error Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

I don't understand what you're trying to do and I have a real problem with activecells and selects,
maybe something like this ?


Code:
Dim lr As Long, x As Long

With Sheets("WinShuttleUpload (2)")
    lr = .Cells(Rows.Count, "I").End(xlUp).Row
    For x = lr To 3 Step -1
        If .Cells(x, "I") <> "" Then
            .Cells(x + .Range("N" & x).Value, "I").Value = .Cells(x, "I").Value
            .Cells(x, "I").ClearContents
        End If
    Next x
End With
Reply With Quote
  #2  
Old 03-23-2017, 11:42 AM
bennyamy bennyamy is offline Application Defined or Object defined error Windows 7 64bit Application Defined or Object defined error Office 2016
Novice
Application Defined or Object defined error
 
Join Date: Mar 2017
Posts: 3
bennyamy is on a distinguished road
Default

Quote:
Originally Posted by NoSparks View Post
I don't understand what you're trying to do and I have a real problem with activecells and selects,
maybe something like this ?
Code:
Dim lr As Long, x As Long

With Sheets("WinShuttleUpload (2)")
    lr = .Cells(Rows.Count, "I").End(xlUp).Row
    For x = lr To 3 Step -1
        If .Cells(x, "I") <> "" Then
            .Cells(x + .Range("N" & x).Value, "I").Value = .Cells(x, "I").Value
            .Cells(x, "I").ClearContents
        End If
    Next x
End With
That worked perfectly. Thanks!!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Application Defined or Object defined error FileSystemObject Compile Error: User-Defined Type Not Defined gsrikanth Excel Programming 2 03-28-2022 06:32 AM
Application Defined or Object defined error User-defined Type not Defined VBA Issue OTPM Project 3 01-02-2014 01:47 PM
Application Defined or Object defined error Range.Information(wdStartOfRangeRowNumber): Application-defined or Object-defined err tinfanide Excel Programming 2 06-09-2012 10:19 AM
Application Defined or Object defined error Application-defined or Object-defined error Manit Excel Programming 4 12-08-2011 07:35 PM
Compile error: sub or function not defined.. xena2305 Excel Programming 0 08-02-2011 10:17 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:26 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft