-1
I have an excel spreadsheet with userform to control a database that is also in excel, this database for having many accesses is shared, but today I saw that VBA does not get along very well with shared files, While saving the file I received error that the file is locked. That was the command:
Private Sub Sair_Click()
Unload Me
Workbooks("database.xlsx").Close savechanges:=True
Workbooks("Controle de Contratos-2020.xlsb").Close savechanges:=True
Application.DisplayAlerts = True 'reativar alertas
End Sub
The shared worksheet is this database.
Alex, I am totally naive in database, is there any way to write the data there without using too much SQL? Because my weak is really the SQL part
– Bruno Melo
Have you worked with Access? is a Software Office package intended specifically for databases, and for being Office as well as excel is the best suited to continue working with VBA. I searched quickly here and found some examples that can help you: here, here here. Good luck!
– Alex Afonso dos Santos