Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Access Interopoledde > Opening Excel s...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 346 of 439
Post > Topic >>

Opening Excel spreadsheet from Access does not refresh data

by "Fjordur" <someone@[EMAIL PROTECTED] > Sep 18, 2006 at 03:36 PM

Hi,
I have a spreadsheet with a sheet that's linked to a query in my database
with automatic refresh on open. I also have a switchboard in the database
item that starts the following code to open the spreadsheet:
    Function OpenExcelFile(strPathToFile As String)
        Dim objXL As Object
        On Error Resume Next
        'Set objXL = GetObject(, "Excel.Application")
        Set objXL = GetObject(strPathToFile)
        objXL.Application.Visible = True
        objXL.Parent.Windows(1).Visible = True
    End Function
It opens OK but the sheet is blank and XL is frozen until I go back to
Access, do nothing there, then go back to XL; then the spreadsheet
refreshes
its data.
Of course I want the spreadsheet to open and refresh without the users
having to switch back to Access then to XL.
What's wrong or missing with the code above?
Thanks for help,
-- 
Fjordur
 




 3 Posts in Topic:
Opening Excel spreadsheet from Access does not refresh data
"Fjordur" <s  2006-09-18 15:36:58 
Re: Opening Excel spreadsheet from Access does not refresh data
"Armando Blanco"  2006-09-19 14:10:48 
Re: Opening Excel spreadsheet from Access does not refresh data
John Nurick <j.mapSoN.  2006-09-19 21:59:32 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 17:12:02 CST 2008.