Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default TransferSpreadsheet and NamedRange; not working!

Thanks Joel. I tried that; didn't work. I've done this many times before,
but with ranges like A1:K5000; never with a named range. That seems to be
quite a problem now. I've seen examples online that do this though. Maybe
it is a reference in Access? I don't really know what to make of this. I'd
appreciate any input though!!


--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"joel" wrote:


The sheet names in excel when you use the ADO method (or any SQL)
requires you to add a dollar sign at the end of the sheet name


So acImport becomes acImport$


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=177803

Microsoft Office Help

.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default TransferSpreadsheet and NamedRange; not working!

I just found out (from Ken Snell); range names are unique in an EXCEL file,
so you do not need the sheet name. Use just the range name.

DoCmd.TransferSpreadsheet acImport, 8, "SharePrices", "C:\Documents and
Settings\ThinkPad\Desktop\Historical Stock Prices.xlsm", True,
"RyanRange"
....works!!!
....assume "RyanRange" is the named range...
--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"ryguy7272" wrote:

Thanks Joel. I tried that; didn't work. I've done this many times before,
but with ranges like A1:K5000; never with a named range. That seems to be
quite a problem now. I've seen examples online that do this though. Maybe
it is a reference in Access? I don't really know what to make of this. I'd
appreciate any input though!!


--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"joel" wrote:


The sheet names in excel when you use the ADO method (or any SQL)
requires you to add a dollar sign at the end of the sheet name


So acImport becomes acImport$


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=177803

Microsoft Office Help

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
TransferSpreadsheet to colored fields alex Excel Worksheet Functions 0 February 10th 10 03:34 PM
Access 2003: transferspreadsheet writes over existing spreadsheet ragtopcaddy via OfficeKB.com Excel Discussion (Misc queries) 0 April 21st 08 02:01 PM
Delete Worksheets Prior To Access DoCmd.TransferSpreadsheet wheatcracker Excel Programming 0 March 2nd 06 12:18 AM
Export to Range from Access with TransferSpreadsheet deko[_3_] Excel Programming 8 June 13th 05 01:54 AM
how to rename sht after TransferSpreadsheet method? Rich[_20_] Excel Programming 2 December 8th 03 06:57 PM


All times are GMT +1. The time now is 06:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"