View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
goepf[_13_] goepf[_13_] is offline
external usenet poster
 
Posts: 1
Default Save sheet as .TXT out of Workbook

Dave,

first thanks for your help!

I'll try to explain the problem again. The code did work for me IF:

only one workbook is open (the one that I use to copy the sheet from)
or more workbooks are open but they are all "maximized". Try once the
following:

open 2 different WB (one with the code) and minimize both WB with the
little button on the top right (_) and then you should have the two
windows at the bottom of your excel screen (minimized). Then maximize
the one with the code and run the code...

What happens with my excel (2000) is that the sheets gets copied but it
saves the initial workbook as a txt and not the new sheet...

Let me know what you get...

Cheers,

Dave Peterson wrote:
*The code copied the worksheet to a new workbook, saved that new
workbook and
closed that new workbook.

I'm not quite sure how you could choose this workbook without opening
it again.

Ps. The code was placed in the original workbook and that original
workbook was
active when I ran the code.

If that isn't the case, then you'll have to fully qualify this
reference:

Worksheets("BESPRO MT").Copy

Something like:
Workbooks("myworkbookname.xls").Worksheets("BESPRO MT").Copy

:More confused:







goepf wrote:

Thanks but...

This still doesn't work. This code creates the same problem!

Meaning if
I change between my Excel workbooks with "minimize window"

(minimize
all the windows and then choose the one I like and maximize it

again)
in stead of using the menu "window" this code saves my initial

workbook
as a txt file and not the sheet (BESPRO MT) I copied!! very

strange!!
It looks like the active window is not the one that I create with

my
copy (eventhough it is when not using that minimize / maximize!!)

conclusion:

HELP

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson
*



---
Message posted from
http://www.ExcelForum.com/