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 As "Cell A1"


Hi, how do I get the "File Name" window in the "Save As" dialog to sho
the word entered in cell A1?

Thanks, Glory

sub saveas ()
Application.Dialogs(xlDialogSaveAs).Show
end su

--
gtto
-----------------------------------------------------------------------
gtton's Profile: http://www.excelforum.com/member.php...fo&userid=2472
View this thread: http://www.excelforum.com/showthread.php?threadid=38539

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default Save As "Cell A1"

Got this by recording a macro in Excel 2000

ChDir "C:\WUTemp"
ActiveWorkbook.SaveAs Filename:="C:\WUTemp\Test.xls",
FileFormat:=xlNormal _
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False


dim wbn as string
wbn = Sheets("MySheet").Range("A1").Text

ChDir "C:\WUTemp"
ActiveWorkbook.SaveAs Filename:="C:\WUTemp\" & wbn, FileFormat:=xlNormal
_
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False


You can also add a variable for DhDir
dim dir as string
dir = "C:\MyFolder\"
ActiveWorkbook.SaveAs Filename:=dir & wbn
--
steveB

Remove "AYN" from email to respond
"gtton" wrote in
message ...

Hi, how do I get the "File Name" window in the "Save As" dialog to show
the word entered in cell A1?

Thanks, Glory

sub saveas ()
Application.Dialogs(xlDialogSaveAs).Show
end sub


--
gtton
------------------------------------------------------------------------
gtton's Profile:
http://www.excelforum.com/member.php...o&userid=24721
View this thread: http://www.excelforum.com/showthread...hreadid=385399



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

You could just pass it that parm:

Option Explicit
Sub MySaveAs()
Application.Dialogs(xlDialogSaveAs).Show _
ThisWorkbook.Worksheets("Sheet1").Range("a1").Valu e
End Sub

I changed the name of your subroutine, too. SaveAs is used by excel. It may
not confuse excel, but it surely would confuse me.

gtton wrote:

Hi, how do I get the "File Name" window in the "Save As" dialog to show
the word entered in cell A1?

Thanks, Glory

sub saveas ()
Application.Dialogs(xlDialogSaveAs).Show
end sub

--
gtton
------------------------------------------------------------------------
gtton's Profile: http://www.excelforum.com/member.php...o&userid=24721
View this thread: http://www.excelforum.com/showthread...hreadid=385399


--

Dave Peterson
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
Selecting "Save As" adds "Copy of" to file name- MS Excel 2007 ronhansen Excel Discussion (Misc queries) 1 November 15th 09 09:33 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
"CELL("FILENAME") NOT UPDATE AFTER "SAVE AS" ACTION yossie6 Excel Discussion (Misc queries) 1 June 16th 08 12:16 PM
"Save" and "Save As" options greyed out - "Save as Webpage" option Bill Excel Discussion (Misc queries) 0 January 16th 07 04:47 PM
save and restore "Workbook Menu Bar" & "Cell" menus Jeff Higgins Excel Programming 2 February 14th 05 01:33 AM


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