Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default button that controls macros?

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default button that controls macros?

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 he
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default button that controls macros?

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 he
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Button Active X controls Kenny Excel Discussion (Misc queries) 1 October 2nd 07 02:39 AM
checkbox that controls macros??? childofthe1980s Setting up and Configuration of Excel 0 March 6th 07 12:40 PM
Excel Add-In with Command Button Controls Mark Dev Excel Programming 3 May 21st 05 02:14 PM
Button controls on worksheets Anson[_2_] Excel Programming 5 June 18th 04 01:46 PM
controls and macros cecilia12345[_7_] Excel Programming 2 December 16th 03 05:26 AM


All times are GMT +1. The time now is 08:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"