VFP9SP1 / Excel 2007

Craig's code works for creating my sheets as requested, but his code for 
deleting Sheet1 is not working.  He's got this (from his AppendXLSX.prg 
program):

                m.loConnection.ConnectionString = 
[Provider=Microsoft.ACE.OLEDB.12.0;Data Source="] + m.tcXLSFile + 
[";Extended Properties="Excel 12.0 Xml;HDR=Yes;";]
                m.loConnection.Open()
                m.loConnection.Execute("DROP TABLE [Sheet1$]")


However, the Sheet1 tab is NOT deleted.  Ideas on a fix?  I've recorded 
a macro and found the code to be this:

     Sheets("Sheet1").Select
     ActiveWindow.SelectedSheets.Delete


His code is using ADODB to connect to the worksheet.  It doesn't seem 
like it invokes Excel directly.  I could add this macro code back in my 
code beyond where he makes it, but it would be nice to just fix the 
source of the problem.

Thanks in advance,
--Mike

-- 
Mike Babcock, MCP
MB Software Solutions, LLC
President, Chief Software Architect
http://mbsoftwaresolutions.com
http://fabmate.com
http://twitter.com/mbabcock16

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to