Results 1 to 2 of 2
  1. #1
    allenjasonbrown@gmail.com is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    44

    error while selecting last cell from access vba

    Does anyone see anything wrong with this?



    xlWB.worksheets(1).Range("A1").End(xlToRight).Sele ct

    I am receiving an error:
    Application-Defined or object-defined error


    If I use this it works fine:
    xlWB.worksheets(1).Range("A1:H1").Select

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    If using LATE BINDING then you need to provide the value for xlToRight either as the value or set up a constant

    Const xlToRight As Integer = -4161

Please reply to this thread with any new information or opinions.

Similar Threads

  1. import specific cell from excel to access
    By maneuk in forum Import/Export Data
    Replies: 10
    Last Post: 07-01-2011, 06:24 AM
  2. Selecting a template to email using Access 2007
    By michaeljohnh in forum Programming
    Replies: 3
    Last Post: 10-20-2010, 09:00 AM
  3. importing a single cell from excel onto access
    By virus100 in forum Import/Export Data
    Replies: 0
    Last Post: 03-20-2010, 11:57 AM
  4. Help with Selecting a single record in access.
    By rfhall50 in forum Programming
    Replies: 3
    Last Post: 08-10-2009, 08:50 AM
  5. Can we post Access cell data to Excel cell properties?
    By Zethro in forum Import/Export Data
    Replies: 1
    Last Post: 12-13-2005, 08:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums