EXCEL: Save a file

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

sk0101

Thread Starter
Joined
Nov 8, 2007
Messages
277
Hi,

I am working on a save functionality. I want to save one/or two tabs while having more in the workbook.

I used this code: But it saves all of them
Dim wk As Excel.Workbook
Set wk = Application.ActiveWorkbook
file_name = "C:\testing.xls"
wk.Worksheets("sheet1").Select
wk.SaveAs (file_name)

How can I modify the code so it saves just one tab? Avoiding of deleting the tabs or hidding the tabs?
Thank you
 
Joined
Oct 20, 2004
Messages
7,837
Files and worksheets are fundamentally different, yet intrinsically tied - I don't think you can do this.
I believe you could export the worksheets you want to save to a new workbook, however, and save that as a new file.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top