PC Review


Reply
Thread Tools Rate Thread

button that controls macros?

 
 
=?Utf-8?B?Y2hpbGRvZnRoZTE5ODBz?=
Guest
Posts: n/a
 
      7th Mar 2007
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?VGFtYXI=?=
Guest
Posts: n/a
 
      7th Mar 2007
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

 
Reply With Quote
 
=?Utf-8?B?Y2hpbGRvZnRoZTE5ODBz?=
Guest
Posts: n/a
 
      7th Mar 2007
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Controls tab missing from "Format Controls" for Option Button Marc Hillman Microsoft Excel Discussion 3 22nd Jun 2008 03:44 PM
Controls on Chart Forget assigned Macros. Jahanzaib Microsoft Excel Programming 5 5th Dec 2007 04:15 PM
Add controls wizard using macros vs. VBA in 2007 Ed Finley Microsoft Access Forms 0 15th Oct 2007 12:34 PM
checkbox that controls macros??? =?Utf-8?B?Y2hpbGRvZnRoZTE5ODBz?= Microsoft Excel Setup 0 6th Mar 2007 12:40 PM
controls and macros cecilia12345 Microsoft Excel Programming 2 16th Dec 2003 05:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:33 PM.