Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro save given range to .xlw
One way:
Assume: save from row 2 down, name to come from A1 Public Sub NoHiddenCSV() Const DELIMITER As String = "," Dim myRecord As Range Dim myField As Range Dim sOut As String Open Range("A1").Text & ".csv" For Output As #1 For Each myRecord In Range("A2:A" & _ Range("A" & Rows.Count).End(xlUp).Row) If Not myRecord.EntireRow.Hidden Then With myRecord For Each myField In Range(.Cells, _ Cells(.Row, Columns.Count).End(xlToLeft)) If Not myField.EntireColumn.Hidden Then _ sOut = sOut & DELIMITER & myField.Text Next myField Print #1, Mid(sOut, 2) sOut = Empty End With End If Next myRecord Close #1 End Sub In article , (topas) wrote: Please help me with a macro which saves the active worksheet to a .csv file with the filename to choose or with the filename to get from a specific cell. the active worksheet contains hidden areas which must not be saved. Thanks Juergen Kimmel |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to Insert Current Date into cell - Macro to "Save As" | Excel Worksheet Functions | |||
Macro to Save without the Save Message | Excel Discussion (Misc queries) | |||
Save a Range on a Workbook as a CSV File | Excel Discussion (Misc queries) | |||
File Save As -Selected Range | Excel Discussion (Misc queries) | |||
VBA to save range as a HTML fife | Excel Programming |