A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Export Query To Excel Problem



 
 
Thread Tools Display Modes
  #1  
Old November 10th, 2009, 08:10 PM posted to microsoft.public.access.queries
Pam
external usenet poster
 
Posts: 131
Default Export Query To Excel Problem

Hi,

I have the following code to export a query to excel using a command button.
It was working well. Now user tells me he can't get it to work. If I log
on to the database, it works for me. If I log on using his log on info, it
doesn't work. Can anyone please tell me why and what I need to do to
correct this? Any help is appreciated.

Private Sub Command10_Click()

Dim strFolderAndFile As String
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"qStatusDayCountAllJobs", "C:\DELTADB\AllJobs.xls"
Dim oApp As Object

Set oApp = CreateObject("Excel.Application")
oApp.Workbooks.Open "C:\deltadb\AllJobs.xls"
oApp.Visible = True

End Sub

Thanks in advance,
Pam


  #2  
Old November 11th, 2009, 02:40 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Export Query To Excel Problem

"doesn't work"

How? Any error messages?
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Pam" wrote:

Hi,

I have the following code to export a query to excel using a command button.
It was working well. Now user tells me he can't get it to work. If I log
on to the database, it works for me. If I log on using his log on info, it
doesn't work. Can anyone please tell me why and what I need to do to
correct this? Any help is appreciated.

Private Sub Command10_Click()

Dim strFolderAndFile As String
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"qStatusDayCountAllJobs", "C:\DELTADB\AllJobs.xls"
Dim oApp As Object

Set oApp = CreateObject("Excel.Application")
oApp.Workbooks.Open "C:\deltadb\AllJobs.xls"
oApp.Visible = True

End Sub

Thanks in advance,
Pam


.

  #3  
Old December 9th, 2009, 03:09 PM posted to microsoft.public.access.queries
Pam
external usenet poster
 
Posts: 131
Default Export Query To Excel Problem

Hi,

It's been a while since my original post, but it seems user is still having
problems exporting to excel.

Jerry asked "How?" it does not work. Any error messages.

No error messages and it doesn't do anything when the user clicks on the
command button. The cursor is an arrow - no hourglass as in waiting.

I would really appreciate any help in trying to figure this out. I'm really
stumped why it will work on my computer with my login, but not with user's
login.
Thanks in advance,
Pam

"Jerry Whittle" wrote in message
...
"doesn't work"

How? Any error messages?
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Pam" wrote:

Hi,

I have the following code to export a query to excel using a command
button.
It was working well. Now user tells me he can't get it to work. If I
log
on to the database, it works for me. If I log on using his log on info,
it
doesn't work. Can anyone please tell me why and what I need to do to
correct this? Any help is appreciated.

Private Sub Command10_Click()

Dim strFolderAndFile As String
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"qStatusDayCountAllJobs", "C:\DELTADB\AllJobs.xls"
Dim oApp As Object

Set oApp = CreateObject("Excel.Application")
oApp.Workbooks.Open "C:\deltadb\AllJobs.xls"
oApp.Visible = True

End Sub

Thanks in advance,
Pam


.



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.