Results 1 to 3 of 3
  1. #1
    RunTime91 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2014
    Posts
    281

    DoCmd.TransferSpreadsheet Range Argument

    Greetings All!



    I'm working with Access front end built many years ago in which the range argument for a DoCmd.TransferSpreadsheet is as follows:

    SheetName & "$"

    The full query is here
    Code:
    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, "WorkbookName", FilePathName, True, SheetName & "$"
    I'm sure the: "$" is a variable is some sort but what does it represent? Entire sheet? Current Range? Special Cells?
    The code works perfectly but I'm doing some mods to the program and would like to know what the heck it represents?

    Thanks so much

    Rt91

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    in the context of excel the $ marks the end of the sheet name, so it is not a variable.

    So a range in sheet1 might be

    sheet1$A1:C333

    sheet1$ on its own means the whole sheet - not because of the $, but because there is nothing after the $

  3. #3
    RunTime91 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2014
    Posts
    281
    Ahhh...Ajax - Thank You! That explains it perfectly!!

    Stay Tuned for another interesting couple lines of code from this very old db

    Thanks again!

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

Similar Threads

  1. DoCmd.TransferSpreadsheet
    By mp3909 in forum Access
    Replies: 2
    Last Post: 03-21-2019, 06:38 AM
  2. DoCmd.TransferSpreadsheet for a found range
    By Sephaerius in forum Modules
    Replies: 5
    Last Post: 03-01-2019, 02:34 PM
  3. Docmd.Transferspreadsheet
    By RayMilhon in forum Programming
    Replies: 5
    Last Post: 06-30-2017, 08:49 PM
  4. How do I use DoCmd.TransferSpreadsheet acExport
    By morerockin in forum Access
    Replies: 6
    Last Post: 09-24-2015, 03:28 PM
  5. DoCmd.OpenReport Where Argument
    By snipe in forum Programming
    Replies: 2
    Last Post: 04-24-2014, 10:24 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