Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / November 2007

Tip: Looking for answers? Try searching our database.

Current Selection = Object

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
whicks - 07 Nov 2007 15:50 GMT
I'm trying to set a relative reference as an "object" in VBA.

Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select

I want this to be my "Object"

Should I Say;

Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select = Object

?????

Or;

ActiveSheet.UsedRange.Select = Object
JE McGimpsey - 07 Nov 2007 16:12 GMT
I'm not sure I understand what you're doing, but possibly:

   Dim obj As Object
   Set obj = ActiveSheet.UsedRange

or, usually better:

   Dim rng As Range
   Set rng = ActiveSheet.UsedRange

> I'm trying to set a relative reference as an "object" in VBA.
>
[quoted text clipped - 11 lines]
>
> ActiveSheet.UsedRange.Select = Object
whicks - 07 Nov 2007 17:09 GMT
That's it!!

You are a wise one - Thanks!

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.