Hello,
I am trying to create vba code that can export to csv with UTF-8 file format,
with few little function
[TABLE="width: 500"]
<tbody>[TR]
[TD]#[/TD]
[TD]Use[/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]false[/TD]
[TD]Apple[/TD]
[TD]Bat[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]true[/TD]
[TD]Airplane[/TD]
[TD]Boss[/TD]
[/TR]
</tbody>[/TABLE]
when it export it only
export true such as
[TABLE="width: 500"]
<tbody>[TR]
[TD]#[/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Airplane[/TD]
[TD]Boss[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
with all the active worksheet.
expect sheets that i don't want to export.
save them as worksheet's name.csv
this is line of code i tried
but i just cant make them work.
i didn't want to use range because table can get bigger, and I didn't want to limit them.
unless there is away i can always check how big is the table is.
I am trying to create vba code that can export to csv with UTF-8 file format,
with few little function
[TABLE="width: 500"]
<tbody>[TR]
[TD]#[/TD]
[TD]Use[/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]false[/TD]
[TD]Apple[/TD]
[TD]Bat[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]true[/TD]
[TD]Airplane[/TD]
[TD]Boss[/TD]
[/TR]
</tbody>[/TABLE]
when it export it only
export true such as
[TABLE="width: 500"]
<tbody>[TR]
[TD]#[/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Airplane[/TD]
[TD]Boss[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
with all the active worksheet.
expect sheets that i don't want to export.
save them as worksheet's name.csv
this is line of code i tried
but i just cant make them work.
i didn't want to use range because table can get bigger, and I didn't want to limit them.
unless there is away i can always check how big is the table is.
Code:
Sub ExportCSV()
Dim workbk As WorkBook
Dim workSt As Worksheet
Application.Workbook
Set workbk = ActiveWorkbook
Set workSt = ActiveWorkSheet
workSt.Columns,AutoFilter Field:=1, Criterial:="False"
workSt.UsedRange.SpecialCell(xlCellTypeVisble).EntireRow.Delete
workSt.AutoFilerMode = false
Workbk.SaveAs Filename:=ThisWorkbook.Path & ActiveSheet& ".csv",FileFormat:=xlCsv
Workbk.Close False
End Sub