PC Review


Reply
Thread Tools Rate Thread

"Expected function or variable" while using transferdatasheet

 
 
=?Utf-8?B?TWFkaHVyaQ==?=
Guest
Posts: n/a
 
      7th Jul 2005
hi all,

I am trying to do thisin the MSaccess form coding
I added a button to run Excel application and the code for the button looks
like this
Private Sub Command93_Click()
On Error GoTo Err_Command93_Click
DoCmd.TransferSpreadsheet(acExport, acSpreadsheetTypeExcel9,
qKPWC_RECOUP, "C:\TRY", YES)

Exit_Command93_Click:
Exit Sub

Err_Command93_Click:
MsgBox Err.Description
Resume Exit_Command93_Click

End Sub

but the code dosent run and is giving me an error

1) It gives me a error that "=" is expected somewhere. Does the
transferdatasheet action return any value. If it does what datatype does it
return

I tried modifying and added a
Dim x as variant
and assigned
x = DoCmd.TransferSpreadsheet(acExport, acSpreadsheetTypeExcel9,
qKPWC_RECOUP, "C:\TRY", YES)

but now while executing the code it gives me

Compile error : highlighted on Transferspreadsheet method
"Expected function or variable"

Please help

Madhuri


 
Reply With Quote
 
 
 
 
Ken Snell [MVP]
Guest
Posts: n/a
 
      7th Jul 2005
see reply in the thread that we're already in..... please don't start a new
thread unless you have a new question.
--

Ken Snell
<MS ACCESS MVP>


"Madhuri" <(E-Mail Removed)> wrote in message
news:55D4959E-AF96-42DB-80DE-(E-Mail Removed)...
> hi all,
>
> I am trying to do thisin the MSaccess form coding
> I added a button to run Excel application and the code for the button
> looks
> like this
> Private Sub Command93_Click()
> On Error GoTo Err_Command93_Click
> DoCmd.TransferSpreadsheet(acExport, acSpreadsheetTypeExcel9,
> qKPWC_RECOUP, "C:\TRY", YES)
>
> Exit_Command93_Click:
> Exit Sub
>
> Err_Command93_Click:
> MsgBox Err.Description
> Resume Exit_Command93_Click
>
> End Sub
>
> but the code dosent run and is giving me an error
>
> 1) It gives me a error that "=" is expected somewhere. Does the
> transferdatasheet action return any value. If it does what datatype does
> it
> return
>
> I tried modifying and added a
> Dim x as variant
> and assigned
> x = DoCmd.TransferSpreadsheet(acExport, acSpreadsheetTypeExcel9,
> qKPWC_RECOUP, "C:\TRY", YES)
>
> but now while executing the code it gives me
>
> Compile error : highlighted on Transferspreadsheet method
> "Expected function or variable"
>
> Please help
>
> Madhuri
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using the "if" function, the "and" function and the "or" function Superblonde64 Microsoft Excel New Users 1 28th Feb 2010 03:13 AM
using list function while using if conditions =?Utf-8?B?cnZz?= Microsoft Access VBA Modules 1 29th Aug 2006 05:19 PM
Using IF function for many many cells, and using more than one IF function Aikisteve Microsoft Excel Worksheet Functions 0 6th Jul 2006 01:18 PM
Stop Overtype Function from popping up while using Word =?Utf-8?B?Q2FubmVyeSBXb3Jrcw==?= Microsoft Word Document Management 3 8th Feb 2005 05:09 PM
How to copy the cell format while using the "IF" function. =?Utf-8?B?SGFyZW4gSmV0aHdh?= Microsoft Excel Worksheet Functions 1 22nd Jan 2004 11:44 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:24 AM.