[AccessD] Excel Automation Problem - spreadsheet is hidden

Rocky Smolin rockysmolin at bchacc.com
Tue Apr 13 15:18:19 CDT 2010


Lambert:

Tried that first but it barfs on  xlBook.Visible = True where xlBook is
defined: Dim xlBook As Excel.Workbook

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 12:54 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Excel Automation Problem - spreadsheet is hidden

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 

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list