X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Link Access And Certain Named Range From Excel, Access 2016    
post Oct 24 2019, 03:18 AM

Posts: 82
Joined: 3-April 19

Hi, I try to make link bettwen access and excel in by using this code:
Docmd.TransferSpreadsheet acLink,  , "MyTable", CurrentProject.Path &"\"& "MyExecelFileName" ,True,"Sheet1$"

But I couldn't use the named range from the sheet only the address of the range.
Is there any way to get the name of the range in my code?
Thanks in advance.
Go to the top of the page
post Oct 24 2019, 03:51 AM

Posts: 1,179
Joined: 25-January 16
From: The Great Land

If you want to use range name, don't need sheet reference.

Docmd.TransferSpreadsheet acLink, , "MyTable", CurrentProject.Path &"\"& "MyExecelFileName" ,True, "rangename"

Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Go to the top of the page
post Oct 24 2019, 04:36 AM

Posts: 82
Joined: 3-April 19

it works perfectly
🙏 thanks again
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    26th January 2020 - 10:01 PM