Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.basic.visual.misc > #1088
| From | ralph <nt_consulting64@yahoo.com> |
|---|---|
| Newsgroups | comp.lang.basic.visual.misc |
| Subject | Re: TransferSpreadsheet |
| Date | 2012-05-21 09:58 -0500 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <eglkr7lvbnkhsckcef55nmfhef8b7486kb@4ax.com> (permalink) |
| References | <4c2a6933-a8d7-475f-a771-59ac2abd2e93@b26g2000vbt.googlegroups.com> |
On Mon, 21 May 2012 05:11:32 -0700 (PDT), colmkav
<colmjkav@yahoo.co.uk> wrote:
>Hi,
>
>I am trying to execute the following code in order to automatically
>import an excel file to my Access database
>
>DoCmd.TransferSpreadsheet TransferType:=acImport,
>SpreadSheetType:=acSpreadsheetTypeExcel5, TableName:="Newdata", _
> Filename:=sExcelFile, HasFieldNames:=True
>
>I get the error msg "The command or action 'TransferSheet Data' ins't
>available now."
>
>However, when I try to import the file (sExcelFile) manually I am able
>to do so.
>
>Where am I possibly going wrong with the code?
>
This error is most often caused by an implicit reference not being
resolved in the current context. Therefore usually resolved by
providing an more explict reference or method.
Try something like ...
DoCmd.TransferSpreadsheet "Object_of_interest"
or
Object_of_interest.TransferSpreadsheet
-ralph
Back to comp.lang.basic.visual.misc | Previous | Next — Previous in thread | Find similar
TransferSpreadsheet colmkav <colmjkav@yahoo.co.uk> - 2012-05-21 05:11 -0700 Re: TransferSpreadsheet ralph <nt_consulting64@yahoo.com> - 2012-05-21 09:58 -0500
csiph-web