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


I have been working on this now for a few days...

I need to make a macro that will allow me to save the document usin
some of the info in the worksheet. IE...

cell H3 has a name (John_Smith) and cell B2 has a date (11-15-04).

I would like to have the macro save the file using that info as th
name of the file.
John_smith11-15-04.xls

I have not been able to come up with the formula for the life of me.
my luck it cant me done...

Can anyone help me with this... :)
-Ro

--
N242N
-----------------------------------------------------------------------
N242NY's Profile: http://www.excelforum.com/member.php...fo&userid=1650
View this thread: http://www.excelforum.com/showthread.php?threadid=31367

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default save command

Hi
try

sub foo()
dim fname as string
with activesheet
fname=.range("H3").value & format(.range("B2").value,"mm-dd-yy") & ".xls"
end with
activeworkbook.saveas fname

"N242NY" wrote:


I have been working on this now for a few days...

I need to make a macro that will allow me to save the document using
some of the info in the worksheet. IE...

cell H3 has a name (John_Smith) and cell B2 has a date (11-15-04).

I would like to have the macro save the file using that info as the
name of the file.
John_smith11-15-04.xls

I have not been able to come up with the formula for the life of me..
my luck it cant me done...

Can anyone help me with this... :)
-Rob


--
N242NY
------------------------------------------------------------------------
N242NY's Profile: http://www.excelforum.com/member.php...o&userid=16508
View this thread: http://www.excelforum.com/showthread...hreadid=313670


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 as Command Line SoDakRah Excel Discussion (Misc queries) 1 July 29th 08 06:12 PM
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() Paul Dennis Excel Discussion (Misc queries) 5 September 18th 06 05:34 PM
Specify a default file name in VB when the Save / Save As command. SMAN Excel Programming 1 September 14th 04 12:23 PM
Save changes command Travis Excel Programming 0 January 28th 04 08:15 PM
Save As command Nikita Excel Programming 1 August 19th 03 08:17 PM


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