Well, there's not supposed to be a second workbook. And, the programming
doesn't have a workbook event.
Most importantly, this issue as I said is only happening on one workstation.
That's why I was wondering if it's an Excel install setting or menu
selection.
"Tamar" wrote:
> You could look in the workbook_open event.
>
> or maybe you didn't close the handle on a sheet prior to the insertion of a
> new sheet in the second workbook.
>
> with "handle" i mean something like this
>
> dim wkbk as workbook
> set wkbk = thisworkbook
>
> now you can work with this workbook as with a variable.
>
> like here:
> wkbk.name = "MyWorkBookName"
>
> or
>
> wkbk.sheets.add
>
> Look in your code for workbook-variable that you didn't set to nothing in
> the end.
>
> it's a little difficult to help you without ur code...
>
> you could also experiment with the name of the worksheet to be created..just
> change it to "NewSheet" than you can easily see the difference in your code
> between "Book1" and "Book 1".
>
> success
>
> "childofthe1980s" wrote:
>
> > Hello:
> >
> > My co-workers and I have researched this issue for our client hundreds of
> > times and we cannot seem to get an answer.
> >
> > We have created a macro for a few workstations. The macro is ignited from
> > another application that exports data to Excel. After the data is dumped to
> > Excel, the macro formats the spreadsheet and does a few other things.
> >
> > On that workstation--and just that workstation--two Excel spreadsheets are
> > created. There is only supposed to be one spreadsheet. The data from the
> > other app gets dumped into a named spreadsheet but, on this one workstation,
> > a second spreadsheet called "Book 1" is created.
> >
> > It has to be something at this workstation this is causing this additional
> > spreadsheet (Book 1) and not the macro. We have looked at everything and we
> > have run out of ideas.
> >
> > Is there a setup checkbox or something like that in Excel that creates an
> > additional spreadsheet, when a macro is run? Does anyone out there have any
> > ideas?
> >
> > Thanks!
> >
> > childofthe1980s
|