Morning All;
I have the following export to excel code on a button in my form; which is working well:
What i would like o do is; have this code delete the first column from the excel file: All_Live_For_Sifting_Cred.xlsx before opening it. Is this possible and how do i modify my code to do this?
Kind Regards
Tor Fey
I have the following export to excel code on a button in my form; which is working well:
Code:
'Check for and deletes the current All_Live_For_Sifting_Cred.xlsx file located: E:\All_Temporary_Data
Dim stAppName As String
stAppName = "E:\All_Temporary_Data\Delete(All_Live_For_Sifting_Cred.xlsx).bat"
Call Shell(stAppName, 1)
'Exports the form: frm_all_live_for_sifting_cred to an Excel file (.xlsx format) called: All_Live_For_Sifting_Cred.xlsx, located in the: E:\All_Temporary_Data area
DoCmd.OutputTo ObjectType:=acOutputForm, ObjectName:="frm_all_live_for_sifting_cred", OutputFormat:=acFormatXLSX, Outputfile:="E:\All_Temporary_Data\All_Live_For_Sifting_Cred.xlsx"
'Opens the All_Live_For_Sifting_Cred.xlsx Spreadsheet from E:\All_Temporary_Data
Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Set xlApp = New Excel.Application
With xlApp
.Visible = True
Set xlWB = .Workbooks.Open("E:\All_Temporary_Data\All_Live_For_Sifting_Cred.xlsx", , False)
End With
End Sub
What i would like o do is; have this code delete the first column from the excel file: All_Live_For_Sifting_Cred.xlsx before opening it. Is this possible and how do i modify my code to do this?
Kind Regards
Tor Fey