Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default A macro that can save a file?


Is it possible to make a macro the will save the current spreadsheet?

I want to make a macro the will save the spreadsheet with the filenam
A2_A3.xls

So if A2 was "Bloggs" and A3 was "Joe" the file would save a
Bloggs_Joe.xls

I've allready made the macro clear certain cells but I've only don
this by using the record macro function and editing out certain part
cause I don't really understand visual basic

Thanks in advance.

Gle

--
sir_gle
-----------------------------------------------------------------------
sir_glen's Profile: http://www.excelforum.com/member.php...fo&userid=1476
View this thread: http://www.excelforum.com/showthread.php?threadid=27333

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default A macro that can save a file?

Something like

Dim FName As String

FName = ActiveSheet.Range("a2") & "_" & ActiveSheet.Range("a3")

ActiveWorkbook.SaveAs Filename:= _
FName, FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False

should do it.

Jan

"sir_glen" skrev i en meddelelse
...

Is it possible to make a macro the will save the current spreadsheet?

I want to make a macro the will save the spreadsheet with the filename
A2_A3.xls

So if A2 was "Bloggs" and A3 was "Joe" the file would save as
Bloggs_Joe.xls

I've allready made the macro clear certain cells but I've only done
this by using the record macro function and editing out certain parts
cause I don't really understand visual basic

Thanks in advance.

Glen


--
sir_glen
------------------------------------------------------------------------
sir_glen's Profile:

http://www.excelforum.com/member.php...o&userid=14768
View this thread: http://www.excelforum.com/showthread...hreadid=273333



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
2007 Macro to Open File, Delete Contents, Save New File Flintstone[_2_] Excel Discussion (Misc queries) 2 February 1st 10 11:25 PM
Macro Save File (Unique file name) SJC Excel Worksheet Functions 5 October 27th 05 10:09 PM
Using a macro to save a file. Menoh Excel Programming 2 October 5th 04 07:24 PM
Macro to insert values from a file and save another sheet as a .txt file Frank[_16_] Excel Programming 2 August 28th 03 01:07 AM
Automate open file, update links, run macro, close and save file Geoff[_7_] Excel Programming 2 August 26th 03 10:13 PM


All times are GMT +1. The time now is 10:16 PM.

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"