Is it possible in vba to close the current workbook you are using without saving changes, re-open it, update a cell value, then close that workbook this time saving changes?
I had code that worked, but when I tried it again in another workbook it would close the first time, terminating the code.
Code
Dim obook As Workbook
Dim varTCMasterWorkbook
varTCMasterWorkbook = ActiveWorkbook.Name 'master workbook name
'does stuff
obook.Close Savechanges:=false
Set obook = Nothing
Set obook = Application.Workbooks.Open("C:\" & varTCMasterWorkbook)
Application.DisplayAlerts = True
Dim s_counter, c_counter
'add a submission counter to the summary and custom summary pages to keep track of multiple submissions for one profile
Worksheets("Summary").Unprotect
s_counter = Worksheets("Summary").Range("B2").Value + 1
Worksheets("Summary").Range("B2").Value = s_counter
Worksheets("Summary").Protect
Worksheets("Summary").Visible = False
Worksheets("Custom Summary").Unprotect
c_counter = Worksheets("Custom Summary").Range("B2").Value + 1
Worksheets("Custom Summary").Range("B2").Value = c_counter
Worksheets("custom summary").Range("E1").Value = "Exception/Custom Request"
Worksheets("Custom Summary").Protect
thisworkbook.close Savechanges:=true
Display More