#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Save As


Hi
I have a macro that performs a load of formatting to a workbook. At the
end of it i would like to save a copy of it (i.e save as) in a
particular folder. The path will always be the same, but i would like
the user to enter the actual name that the file will be called.

Can someone point me in the right direction for the syntex

Thanks


--
katmando
------------------------------------------------------------------------
katmando's Profile: http://www.excelforum.com/member.php...o&userid=29803
View this thread: http://www.excelforum.com/showthread...hreadid=499331

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Save As

Hi Katmando,

Try:

'=============
Public Sub Tester()
Dim WB As Workbook
Dim sPath As String
Dim sFilename As String

Set WB = ActiveWorkbook '<===== CHANGE

sPath = "C\MyFolder\" '<===== CHANGE

If Right(sPath, 1) < "\" Then sPath = sPath & "\"

sFilename = InputBox("Please type the new file name")

WB.SaveAs FileName:=sPath & sFilename & ".xls", _
FileFormat:=xlWorkbookNormal
End Sub
'<<=============

---
Regards,
Norman



"katmando" wrote in
message ...

Hi
I have a macro that performs a load of formatting to a workbook. At the
end of it i would like to save a copy of it (i.e save as) in a
particular folder. The path will always be the same, but i would like
the user to enter the actual name that the file will be called.

Can someone point me in the right direction for the syntex

Thanks


--
katmando
------------------------------------------------------------------------
katmando's Profile:
http://www.excelforum.com/member.php...o&userid=29803
View this thread: http://www.excelforum.com/showthread...hreadid=499331



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Save As


Just what i needed:)

Thank

--
katmand
-----------------------------------------------------------------------
katmando's Profile: http://www.excelforum.com/member.php...fo&userid=2980
View this thread: http://www.excelforum.com/showthread.php?threadid=49933

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
Save, save as, page setup dimmed out in unprotected excel sheet? ccKeithJ Excel Discussion (Misc queries) 3 December 14th 07 07:07 PM
SAVE and SAVE AS options disappeared from the drop down FILE menu [email protected] Excel Discussion (Misc queries) 2 July 12th 07 09:14 AM
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: harpscardiff[_10_] Excel Programming 8 November 10th 05 12:24 PM
Why system asks me to save change even after I call save method(VB.NET) steellock Excel Programming 2 April 27th 04 04:14 AM
Save As - Multiple Sheets fails to save as text file Ravee Srinivasan Excel Programming 2 November 10th 03 04:05 PM


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