Hi
I am trying to export a filtered search from a datasheet to an excel spreadsheet - only including certain columns. I am using the below code but it is falling over on the column selection. Without that part it exports fine but i really want to exclude some columns from the export.
Private Sub Command1021_Click()
Columns("H:J").EntireColumn.Hidden = True
DoCmd.OutputTo acOutputForm, "RenewCancelList", acFormatXLS, _
"U:\BOB\ExportedResults.xls"
MsgBox ("Export Complete")
End Sub
Can anyone help?
Janeyg
I am trying to export a filtered search from a datasheet to an excel spreadsheet - only including certain columns. I am using the below code but it is falling over on the column selection. Without that part it exports fine but i really want to exclude some columns from the export.
Private Sub Command1021_Click()
Columns("H:J").EntireColumn.Hidden = True
DoCmd.OutputTo acOutputForm, "RenewCancelList", acFormatXLS, _
"U:\BOB\ExportedResults.xls"
MsgBox ("Export Complete")
End Sub
Can anyone help?
Janeyg