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 |
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 |
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 |
All times are GMT +1. The time now is 08:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com