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 To Excel



 
 
Thread Tools Display Modes
  #1  
Old December 16th, 2009, 07:42 PM posted to microsoft.public.access.queries
Pam
external usenet poster
 
Posts: 131
Default Export To Excel

Hi,

I have the following for a command button on a form that opens when a report
is selected. I have a user who can't get this to work. There is no error
message, his cursor just sits. It works fine for myself and other users.
I've tried his login on my computer and it still doesn't work.

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

Does anyone have any suggestions as to why it won't work for just this one
user's login?

Thanks,
Pam


  #2  
Old December 16th, 2009, 07:45 PM posted to microsoft.public.access.queries
Phil Smith
external usenet poster
 
Posts: 254
Default Export To Excel

On 12/16/2009 11:42 AM, Pam wrote:
Hi,

I have the following for a command button on a form that opens when a report
is selected. I have a user who can't get this to work. There is no error
message, his cursor just sits. It works fine for myself and other users.
I've tried his login on my computer and it still doesn't work.

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

Does anyone have any suggestions as to why it won't work for just this one
user's login?

Thanks,
Pam


Any chance that his login is somehow restricted from writing to that
drive or directory?
Any chance that his login automatically opens that spreadsheet so it
can't be written to?
I don't know what kind of login you are using, but I would look closely
at the permission given to this account, and at any scripts that run for
that user.



  #3  
Old December 17th, 2009, 02:48 PM posted to microsoft.public.access.queries
Pam
external usenet poster
 
Posts: 131
Default Export To Excel

Phil,

Thanks for replying. I've checked permissions for user and for any code
restricting his use for this particular event. He has the same permissions
as another Full Data User who can open and run the report.

Do you have any other suggestions I may be able to try?

Thanks,
Pam

"Phil Smith" wrote in message
...
On 12/16/2009 11:42 AM, Pam wrote:
Hi,

I have the following for a command button on a form that opens when a
report
is selected. I have a user who can't get this to work. There is no
error
message, his cursor just sits. It works fine for myself and other users.
I've tried his login on my computer and it still doesn't work.

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

Does anyone have any suggestions as to why it won't work for just this
one
user's login?

Thanks,
Pam


Any chance that his login is somehow restricted from writing to that drive
or directory?
Any chance that his login automatically opens that spreadsheet so it can't
be written to?
I don't know what kind of login you are using, but I would look closely at
the permission given to this account, and at any scripts that run for that
user.





  #4  
Old December 17th, 2009, 09:54 PM posted to microsoft.public.access.queries
Phil Smith
external usenet poster
 
Posts: 254
Default Export To Excel

Are these people using full on workstations with Office fully loaded, or
some kind of remote solution which may not be running the same version
of access that the rest are? Are you sure it is the login not the
workstation that person is using where the problem is?

Actually, one idea does come to mind. I was assuming that your transfer
was failing, but maybe not...

Open up task manager before starting this macro. Verify that excel is
NOT running. Then launch the macro. At the point where it hangs, is
excel loaded according to the task manager? It may be loading, but not
visible, and then hanging the system for some reason. If so, you will
know where to look at least. Look for CPU activity to see if excel is
doing something or stops. Try removing the code to open Excel, and
opening that spreadsheet manually afterwards to see if it is OK.

Open the VB editor, and single step through the code for you, to get an
idea how long each step takes, then step through as the problem user,
and see which command it fails on.

Not solutions per se, but ideas to at least narrow the problem down..

Phil








On 12/17/2009 6:48 AM, Pam wrote:
Phil,

Thanks for replying. I've checked permissions for user and for any code
restricting his use for this particular event. He has the same permissions
as another Full Data User who can open and run the report.

Do you have any other suggestions I may be able to try?

Thanks,
Pam

"Phil wrote in message
...
On 12/16/2009 11:42 AM, Pam wrote:
Hi,

I have the following for a command button on a form that opens when a
report
is selected. I have a user who can't get this to work. There is no
error
message, his cursor just sits. It works fine for myself and other users.
I've tried his login on my computer and it still doesn't work.

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

Does anyone have any suggestions as to why it won't work for just this
one
user's login?

Thanks,
Pam


Any chance that his login is somehow restricted from writing to that drive
or directory?
Any chance that his login automatically opens that spreadsheet so it can't
be written to?
I don't know what kind of login you are using, but I would look closely at
the permission given to this account, and at any scripts that run for that
user.






  #5  
Old December 18th, 2009, 02:31 PM posted to microsoft.public.access.queries
Pam
external usenet poster
 
Posts: 131
Default Export To Excel

Phil,

Thanks for the info. I don't know what happened, but I logged on as the
user with the problem and it worked as it should. What I could not
understand was why with my login it worked on my computer, but with his
login on his computer and my computer, it wouldn't. We all have full Office
and I checked to make sure we all had the same version. I will have him try
on his computer once he returns and hopefully it will work and continue to
do so.

I'll keep your suggestions in mind should I run into this again.
Thanks for your time and help.
Pam


"Phil Smith" wrote in message
...
Are these people using full on workstations with Office fully loaded, or
some kind of remote solution which may not be running the same version of
access that the rest are? Are you sure it is the login not the
workstation that person is using where the problem is?

Actually, one idea does come to mind. I was assuming that your transfer
was failing, but maybe not...

Open up task manager before starting this macro. Verify that excel is NOT
running. Then launch the macro. At the point where it hangs, is excel
loaded according to the task manager? It may be loading, but not visible,
and then hanging the system for some reason. If so, you will know where
to look at least. Look for CPU activity to see if excel is doing
something or stops. Try removing the code to open Excel, and opening that
spreadsheet manually afterwards to see if it is OK.

Open the VB editor, and single step through the code for you, to get an
idea how long each step takes, then step through as the problem user, and
see which command it fails on.

Not solutions per se, but ideas to at least narrow the problem down..

Phil








On 12/17/2009 6:48 AM, Pam wrote:
Phil,

Thanks for replying. I've checked permissions for user and for any code
restricting his use for this particular event. He has the same
permissions
as another Full Data User who can open and run the report.

Do you have any other suggestions I may be able to try?

Thanks,
Pam

"Phil wrote in message
...
On 12/16/2009 11:42 AM, Pam wrote:
Hi,

I have the following for a command button on a form that opens when a
report
is selected. I have a user who can't get this to work. There is no
error
message, his cursor just sits. It works fine for myself and other
users.
I've tried his login on my computer and it still doesn't work.

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

Does anyone have any suggestions as to why it won't work for just this
one
user's login?

Thanks,
Pam


Any chance that his login is somehow restricted from writing to that
drive
or directory?
Any chance that his login automatically opens that spreadsheet so it
can't
be written to?
I don't know what kind of login you are using, but I would look closely
at
the permission given to this account, and at any scripts that run for
that
user.








 




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 09:39 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.