Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selecting workbook

I have two workbooks. I want to delete worksheets from the one that i
not currently active. How do I do that? Right now it keeps deletin
the sheets from the active one...

Thanks!
Elieze

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Selecting workbook

Make sure to refer to the workbook by name. So if the
workbook is called XYZ.xls (I'm so imaginative!), and it
is currently open:

Workbooks("XYZ").Worksheets("Sheet1").Delete

or

Workbooks("XYZ").Worksheets(1).Delete

tod

-----Original Message-----
I have two workbooks. I want to delete worksheets from

the one that is
not currently active. How do I do that? Right now it

keeps deleting
the sheets from the active one...

Thanks!
Eliezer


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

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Selecting workbook

Specify the other workbook

workbooks("otherbookname.xls").Worksheets("Sheet3" ).Delete

--
Regards,
Tom Ogilvy

"Lazer " wrote in message
...
I have two workbooks. I want to delete worksheets from the one that is
not currently active. How do I do that? Right now it keeps deleting
the sheets from the active one...

Thanks!
Eliezer


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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selecting workbook

Great - thanks!!

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

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
Selecting used cells only in the workbook Sandeep Excel Discussion (Misc queries) 4 July 31st 07 01:04 PM
Vlookup - Array not selecting in other workbook Erinayn Excel Discussion (Misc queries) 0 March 21st 07 03:03 PM
Help!!!! Selecting a cell in another workbook AndyGoz Excel Programming 1 July 24th 04 12:32 AM
Selecting the other open workbook Karen[_6_] Excel Programming 2 August 19th 03 05:48 PM


All times are GMT +1. The time now is 10:47 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"