L
Legacy 287389
Guest
Hi good people!,
I have a very serious problem...Something happened while working on a spreadsheet which is causing me great headache. All I did was create a macro button with this code:
At first I did not have the
event. So, the workbook saves, but when I click the "X" to close the workbook, I get the save prompt. So, I resorted to adding this code in the "BeforeClose" event in the "ThisWorkbook" module.:
This did not prove to do anything, I still got my save prompt. Then I added the
event, and what I found was beyond my understanding: The sheet closes BUT the ribbon is still there with a grey sheet, and all the ribbon icons are greyed out.
I then noticed in the VBA project pane ANOTHER project which is titled: FUNCRES.XLAM. in the module folder there is a RibbonX_code, which says this:
and this:
where on earth did this come from, how do I get rid of it?...I restarted my pc, but still the same thing?..
Then maybe a last point which might shed light. I have 6 of these similar workbooks. They all have the save code. (NOT the "close" part)..so if I select the button, the sheets save and scrolls to A1, after which I then click the Excel Close button. All the sheets close without a problem AS LONG as there are some of these sheets still open..As soon as I get to the last one, I get the save prompt. Please help me with this, I certainly hope it's not a virus or some bug that's starting havoc here...Please help...
I have a very serious problem...Something happened while working on a spreadsheet which is causing me great headache. All I did was create a macro button with this code:
Code:
ActiveSheet.Shapes.Range(Array("Rounded Rectangle 11")).Select
Columns("AD:AF").Select
Selection.EntireColumn.Hidden = True
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
Range("A1").Select
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub
At first I did not have the
HTML:
ActiveWorkbook.Close
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
End Sub
HTML:
ActiveWorkbook.Close
I then noticed in the VBA project pane ANOTHER project which is titled: FUNCRES.XLAM. in the module folder there is a RibbonX_code, which says this:
Code:
'Entry point for RibbonX button click
Sub ShowATPDialog(control As IRibbonControl)
Application.Run ("fDialog")
End Sub
and this:
Code:
'Callback for RibbonX button label
Sub GetATPLabel(control As IRibbonControl, ByRef label)
label = ThisWorkbook.Sheets("RES").Range("A10").Value
End Sub
where on earth did this come from, how do I get rid of it?...I restarted my pc, but still the same thing?..
Then maybe a last point which might shed light. I have 6 of these similar workbooks. They all have the save code. (NOT the "close" part)..so if I select the button, the sheets save and scrolls to A1, after which I then click the Excel Close button. All the sheets close without a problem AS LONG as there are some of these sheets still open..As soon as I get to the last one, I get the save prompt. Please help me with this, I certainly hope it's not a virus or some bug that's starting havoc here...Please help...
Last edited by a moderator: