Results 1 to 6 of 6
  1. #1
    lawdy is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jan 2013
    Posts
    172

    Change Excel sheets from Access vba

    Using Access vba, I am able to open an Excel spreadsheet and get data and/or add data. But, while I am on a certain sheet, I need to get data from another sheet. Is There a function to change sheets? Thanks in advance for you help.

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    No need to change sheets, just refer to the worksheet and range.

  3. #3
    lawdy is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jan 2013
    Posts
    172
    Thanks for you reply, but how would I do that?

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    With the standard
    Workbook.Sheets().Range() syntax ?

    How are you addressing ranges now?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    lawdy is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jan 2013
    Posts
    172
    Code:
    strCat = objWorkSheet.Cells(lngRow, 1)

  6. #6
    lawdy is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jan 2013
    Posts
    172
    Ok, thank you very much.

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

Similar Threads

  1. Appending excel sheets into access table
    By al8876 in forum Access
    Replies: 4
    Last Post: 08-17-2015, 03:44 PM
  2. Import All Sheets from Excel to Access
    By kestefon in forum Access
    Replies: 4
    Last Post: 02-05-2014, 08:30 PM
  3. Replies: 5
    Last Post: 09-20-2013, 12:14 PM
  4. Combine multiple Excel sheets in Access
    By Adcock1969 in forum Access
    Replies: 17
    Last Post: 09-07-2011, 06:03 AM
  5. Import excel sheets to access.
    By calexandru in forum Import/Export Data
    Replies: 0
    Last Post: 08-19-2009, 09:44 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