I need a VBA to do a save as anytime the sheet is changed.
Picking log-Rev6.xlsm
VBA password is Kayley98
I need a VBA to do a save as anytime the sheet is changed.
Picking log-Rev6.xlsm
VBA password is Kayley98
Hi,
You already have in your file appropriate procedure in ThisWorkbook
But as one can see, at the end of it (after first saving) you switch off Events![]()
Please Login or Register to view this content.
I don't think you restore it elsewhere, do you?
If not - the event handlers are disabled and nothing happens after next changes in the workbook.
so may be start with:
And in immediate window of the VBA editor write![]()
Please Login or Register to view this content.
And then try again how your file works![]()
Please Login or Register to view this content.
Best Regards,
Kaper
Still not working
1) in some other pieces of code you are disabling events - I spotted it for instance in Worksheet_Change of your first sheet. (most probable cause of problem). But also in Workbook_BeforeClose - you close the workbook, but enableevents scope is application-wide so other workbooks you have open (or open now) have disabled events too.
2) as you have Workbook_SheetChange in ThisWorkbook code, you shall not try to double the same functionality in sheet codes.
I have not tested further, because you have hardcoded "D:\picking logs\" etc. in several places in the code.
Anyway: if the event does not trigger the procedure - first concern always is(or 0)![]()
Please Login or Register to view this content.
If for some reason you write Application.enableevents = false in the code, always make sure, that few lines later (the sooner, the better) you enable it again by
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks