Results 1 to 4 of 4

Select Range Question

Threaded View

  1. #1
    Registered User
    Join Date
    01-25-2013
    Location
    Wicita, Kansas
    MS-Off Ver
    Excel 2003
    Posts
    5

    Select Range Question

    I am sure I doing something simple to make this error out but I just can't see it. I followed examples but no joy? See the comment in the code for the question; thanks.


    Sub MySelection()
    Dim MyData As Range
    Set MyData = Range("A1:D5")
    
    ' Why does the next line error out "Run-Time error 1004
    '    (Method range of global object failed)
    
    Range("MyData").Select
    
    'While the next line's direct reference to the range does work?
    
    Range("A1:D5").Select
    End Sub
    Last edited by Leith Ross; 02-04-2013 at 07:57 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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