[VBA] First full project


make a macro that will let you in after correct logi or password entered.
Inside you will be able to choose last report (in .txt format) to upload. Your login define your role and report categories that you can choose to upload.
After text implementation you have to update data with current date, and calculate basic price rates.
Received result will be saved automatically as final report wtih .csv extension
After all the data should be cleared in Active sheet, so you could upload next report at the same place as before.

Word version:

[VBA] Saving Workbook as

Hello there 🙂

Today I write a short macro for you to introduce various metolody of saving your workbooks.

Nice thing is that in VBA we have ready-made numeric section dedicated for most fileformats

FileExtStr = “.xlsb”: FileFormatNum = 50
FileExtStr = “.xlsx”: FileFormatNum = 51
FileExtStr = “.xlsm”: FileFormatNum = 52
FileExtStr = “.csv”: FileFormatNum = 6
FileExtStr = “.txt”: FileFormatNum = -4158
FileExtStr = “.prn”: FileFormatNum = 36

Sub SaveAs1()
ActiveWorkbook.SaveAs Filename:="C:\Users\u\Desktop\Nana.xlsm", _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
End Sub

Sub SaveAs2()
ActiveWorkbook.SaveAs Filename:="C:\Users\u\Desktop\Nana.xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
End Sub

Sub SaveAs3()
ActiveWorkbook.SaveAs Filename:="C:\Users\u\Desktop\Nana2.xlsm", _
FileFormat:=52, CreateBackup:=False
End Sub

Sub SaveAs4()
ActiveWorkbook.SaveAs Filename:="C:\Users\u\Desktop\Nana2.xlsm", _
FileFormat:=6, CreateBackup:=False
End Sub