Hi guys, I need some help with a macro Im trying to make
All I am doing is cycling through a folder of .xlsb and saving them as a CSV file and then close
The latter part Im having difficulties with, any code that I try using to close without saving does not work.
When I run the macro, it still asks me if i want to save it down despite having the "False" command at the end
CAn anyone help me, ive always had this issue before but never overcome it
THanks
Below is my code
Do While xExitFile <> ""
Set xWorkBooks = Workbooks.Open(xStrPath & xExitFile)
Application.DisplayAlerts = False
Sheets("Output").Select
xFileCSV = xOutput & Left(xExitFile, 8) & ".csv"
xWorkBooks.SaveAs Filename:=xFileCSV, FileFormat:=xlCSV, CreateBackup:=False
Workbooks(Left(xExitFile, 8) & ".csv").Close False
Application.DisplayAlerts = True
Set xWorkBooks = Nothing
xExitFile = Dir
Loop
All I am doing is cycling through a folder of .xlsb and saving them as a CSV file and then close
The latter part Im having difficulties with, any code that I try using to close without saving does not work.
When I run the macro, it still asks me if i want to save it down despite having the "False" command at the end
CAn anyone help me, ive always had this issue before but never overcome it
THanks
Below is my code
Do While xExitFile <> ""
Set xWorkBooks = Workbooks.Open(xStrPath & xExitFile)
Application.DisplayAlerts = False
Sheets("Output").Select
xFileCSV = xOutput & Left(xExitFile, 8) & ".csv"
xWorkBooks.SaveAs Filename:=xFileCSV, FileFormat:=xlCSV, CreateBackup:=False
Workbooks(Left(xExitFile, 8) & ".csv").Close False
Application.DisplayAlerts = True
Set xWorkBooks = Nothing
xExitFile = Dir
Loop