LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how do i save a single sheet from my workbook?


i have a workbook with a few hidden sheets and a form.
but i only want to save the main sheet under a different name.

the code i have for saving is:
-Sub cmdSave_Click()

With ActiveWorkbook.Sheets("Gegevensblad")
'First part of filename...
a = Range("A4").Value & " - " & Range("B4").Value
'Filename extension...
c = ".xls"
s_filename = a + c
Dim fname As Variant
fname =
Application.GetSaveAsFilename(InitialFileName:=s_f ilename)
If fname = False Then
Debug.Print "user clicked cancel"
'do nothing
Else
Debug.Print "user chose " & fname
ActiveWorkbook.SaveAs Filename:=fname
End If
End With-

i want the option to save the file with this name but it should only
save the main sheet in a new file.
can anyone help me ?


--
eyesonly1965
------------------------------------------------------------------------
eyesonly1965's Profile: http://www.excelforum.com/member.php...o&userid=34199
View this thread: http://www.excelforum.com/showthread...hreadid=541805

 
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
Macro to save Single Page to another workbook Jenny B. Excel Discussion (Misc queries) 2 January 3rd 08 10:02 PM
How do I save a single spreadsheet in a workbook in excel Vic Fourie Excel Worksheet Functions 1 July 15th 06 07:56 AM
Save a single sheet from a workbook JAMES T. Excel Discussion (Misc queries) 2 January 25th 05 02:16 PM
is it possible to use F9 to manually calculate in a single sheet or single workbook? Hersbt Excel Discussion (Misc queries) 2 December 29th 04 04:42 PM
print and save a single sheet from a workbook using a commandbutt. bibio_ Excel Programming 1 November 13th 04 12:53 PM


All times are GMT +1. The time now is 03:50 AM.

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

About Us

"It's about Microsoft Excel"