View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Please Help[_4_] Please Help[_4_] is offline
external usenet poster
 
Posts: 1
Default Help with pivot tables

I have created a pivot table in Excel that is linked to a
MS Access database. I have a command in Access that will
open excel and the pivot table file. However, when it
opens I cannot click anywhere on the table (can't double
click, right click, etc.) Once I minimize excel and
maximize it again I then am able to click anywhere on the
table and refresh data. Can anyone tell me why this is
happening? I need to be able to click on the table as
soon as the file is open without having to minimize and
maximize again. The following is the code I am using in
Access to open the excel sheet.

Sub Open_File()
On Error GoTo Err_Command24_Click
Dim oApp As Object
Dim myExl As Object
On Error GoTo err_cmdOpen

Set oApp = GetObject(, "Excel.Application")

err_cmdOpen:
Set oApp = CreateObject("Excel.Application")
oApp.Visible = True

Set myExl =
GetObject"C:\ResourcePlanning\AllocationReport.xls ")

'oApp.Visible = True
myExl.Windows(1).Visible = True

On Error Resume Next


Exit_Command24_Click:
Exit Sub

Err_Command24_Click:
MsgBox Err.Description
Resume Exit_Command24_Click

End Sub