VB and an Excel Spreadsheet
I'm writing a program in VB6 that accesses an Excel spreadsheet for storing,
manipulating and printing out data. Here's what's happening:
First, consider the following code, as copied from a recorded Excel macro:
I recorded that macro in an effort to troubleshoot the following from the
This code WORKS. . .
. . . IF I have the spreadsheet open at the same time, the code runs without
error. HOWEVER, if the spreadsheet is closed (and mind you, everything else
STILL works okay), I get the following:
Runtime Error '1004':
Select method of Range class failed.
Selecting "Debug" highlights the third line (LastSheet.Range("A1").Select)
as containing the offending code.
I'd greatly appreciate ANY help.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL