Heenan, Lambert
Lambert.Heenan at chartisinsurance.com
Tue Apr 13 14:53:45 CDT 2010
Hmm. I took a closer look at that site and noticed that the coder has not even declared the variable wkbNewBook, and the code is evidently written to run in Excel VBA.
However, in your code, assuming that xlBook is an Excel.WorkBook object, you should be able to write this...
' close spreadsheet
Set xlSheetProductionPlan = Nothing
Set xlSheetBOMs = Nothing
xlBook.Visible = True
xlBook.Save
xlBook.Close
Set xlApp = Nothing
Set xlBook = Nothing
MsgBox "Export Complete.", vbExclamation
End Sub
Lambert
-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
Sent: Tuesday, April 13, 2010 3:26 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Excel Automation Problem - spreadsheet is hidden
Lambert:
I get Object does not support this property or method on the .Visible = True
Rocky
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert
Sent: Tuesday, April 13, 2010 11:44 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Excel Automation Problem - spreadsheet is hidden
This looks like a possible solution...
http://www.vbforums.com/archive/index.php/t-411430.html
Lambert