• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Ask for macro in VBA

Hello Friends!

I have a question!

I have imported some files and finally its all ready ! But now i need one last thing! and i dont know if its possible.

When i import a File ! The fail stays on the program and im inserting infomoration all time !
Its possible when i insert a new information in the new program that information go to for the other file ! Just to have a secure copy cause normaly the pc goes off and im losting alot of info ://

Ty for the help!
If im havnt explained that good . Right and i will try again !
TYYYYY
 

Attachments

  • ProgramaDavid.xlsm
    176.4 KB · Views: 4
RyujinLegacy
You could modify end of code like below:
(= add those two lines)
Code:
    Next Tabs
   
    Workbooks(wb_2).Close savechanges:=False
   
    ThisWorkbook.Save
    Workbooks(wb_1).SaveCopyAs Format(Now, "yymmdd_hhmmss") & "_" & wb_1
   
    Application.DisplayAlerts = True
    Application.ScreenUpdating = True
    MsgBox "Importado Com Sucesso"
End Sub
I didn't test this.
 
RyujinLegacy
You were worry about loosing information.
If You 'just' add something in one another file ... then nothing better.
You should make 'SaveCopyAs' to make sure that You would always have as previous as possible situation saved ... somewhere.
Of course, with naming of that filename, there would be 'only last 50 versions' ... whatever needs.
 
But they asked this .

When we begin the program , the program must create a Security copy and when we increase a new register , the program must save the info at the Security Copy also :)

Ty and Good Morning!
 
Last edited:
RyujinLegacy
Do they know...
1) How can I tell to file a moment like 'when we begin the program'?
2) What includes 'a new register'?
3) What includes 'the info'?
... and still there is that challenge they didn't figure!
 
The Program Begin When We Open the Excel File!
A New Register its when we star the program . Next we click on "Avançar" and on "Novo Registo de Transporte" . Next we Write at all the Spaces and Press "Inserir Registo"
The "info" its the Register that we have made!
 
RyujinLegacy
I hope that They really told You what do they wanted.
'Program' makes a new file every time it opens.
After ... some clicks ... and Press "Inserir Registo".
'Program' saves that row to that file which has made and save itself.
... and still there is that challenge they didn't figure!
the pc goes off and im losting alot of info ://
... if it is okay ... for them ... then no matter!
 

Attachments

  • ProgramaDavid.xlsb
    85.7 KB · Views: 2
Back
Top