Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() how do i save this macro to a csv file Sheets("sheet1").Select Range("E4").Select Name = ActiveCell.Value If ActiveCell = "" Then GoTo 2 Else ChDir "C:\Documents and Settings\skirk\My Documents\macros" ActiveWorkbook.SaveAs Filename:=Name thanks steve -- stevekirk ------------------------------------------------------------------------ stevekirk's Profile: http://www.excelforum.com/member.php...o&userid=37328 View this thread: http://www.excelforum.com/showthread...hreadid=570639 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Maybe...
dim myFileName as string with worksheets("Sheet1") .select myfilename = "C:\Documents and Settings\skirk\My Documents\macros\" & _ .range("E4").value .parent.saveas filename:=myfilename, fileformat:=xlcsv end with But this saves the workbook as a .csv file--it doesn't save the macro in that ..csv file. CSV files are plain text--they don't save formatting, formulas, macros, etc. stevekirk wrote: how do i save this macro to a csv file Sheets("sheet1").Select Range("E4").Select Name = ActiveCell.Value If ActiveCell = "" Then GoTo 2 Else ChDir "C:\Documents and Settings\skirk\My Documents\macros" ActiveWorkbook.SaveAs Filename:=Name thanks steve -- stevekirk ------------------------------------------------------------------------ stevekirk's Profile: http://www.excelforum.com/member.php...o&userid=37328 View this thread: http://www.excelforum.com/showthread...hreadid=570639 -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() thanks macro worked great thank you -- stevekirk ------------------------------------------------------------------------ stevekirk's Profile: http://www.excelforum.com/member.php...o&userid=37328 View this thread: http://www.excelforum.com/showthread...hreadid=570639 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
running a macro from a list | Excel Worksheet Functions | |||
Save a Macro | Excel Discussion (Misc queries) | |||
How do I save macro so it's there for all Excel sheets? | Excel Discussion (Misc queries) | |||
How to stop getting the file save box when running a macro | Excel Discussion (Misc queries) | |||
Macro in Excel 2002 to save a workbook to a FTP location | Excel Discussion (Misc queries) |