Workbook requires two saves?

Warhammer123

New Member
Joined
Jan 16, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I have made a large workbook for my company used for managing stock and it contains buttons, vba code and large amount of formulas in all the sheets. Been using this workbook for a year and went on break over the holiday and when I tried using it again, I will click save before exiting as normal but for some reason now it will state that I need to / haven't saved workbook so I proceed to click save again and the it works and I can exit. I have never had this issue before and its just inconvenient as I have to do it every time now. (p.s. It only occurs with that one specific workbook, all my other workbooks are working normally)
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Welcome to the Board!

Do you have any VBA code in the "ThisWorkbook" module?
If so, what the procedure names, exactly?
 
Upvote 0
Yes it does, there is too much code to try list every procedure I used but majority is data entry from one sheet to another, I don't use UserForms as I like having all my function available on the sheet. I should probably mention I have had a number of problems with this workbook purely due to my new learning of vba and the only reason I haven't just re created it with my new knowledge is because it will take too long and I have other projects to work on. I basically save backups constantly incase it bugs out and all my vba stops working and I have narrowed down the likely vba codes that were causing it and fixed or removed it. This is a issue I have never encountered and can't find any info on someone with a similar issue and its not the end of the world as the workbook is still functionable but with the added step of saving a second time.
 
Upvote 0
No, I am asking for code specifically in the "ThisWorkbook" module. This should only consist of Event Procedure (automated) code.
We are looking for something named like:
VBA Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
or
VBA Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
or
VBA Code:
Private Sub Workbook_AfterSave(ByVal Success As Boolean)
or other automated procedures that might be interacting here.
 
Upvote 0
No, I am asking for code specifically in the "ThisWorkbook" module. This should only consist of Event Procedure (automated) code.
We are looking for something named like:
VBA Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
or
VBA Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
or
VBA Code:
Private Sub Workbook_AfterSave(ByVal Success As Boolean)
or other automated procedures that might be interacting here.


Oh yes, I did use to have a bit of code in that module to do with setting scroll area on open but removed them because that was the most cause of my issues. This is the only code I have in that module now which is simple.


Private Sub Workbook_Open()


If ThisWorkbook.Sheets("Forecast Chart") Is ActiveSheet Then

MsgBox "Welcome", vbOKOnly + vbInformation

Exit Sub
End If


If MsgBox("Do you want to go to Forecast Chart Page?", vbYesNo + vbQuestion, "Question") = vbNo Then

Exit Sub
End If


ThisWorkbook.Sheets("Forecast Chart").Activate


End Sub
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,095
Latest member
nmaske

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top