Hello All,
I had the following VBA code that was working in Excel 97-2003, but now when I am running that in 2007/2010 it is stopped at:
Set mybar = CommandBars.Add(Name:="PowerBar", Position:=msoBarTop, Temporary:=True)
and producing following compatibility report, any idea how to fix this? there may be other compatibility issue so advise your best.
------------------------
--------
Compatibility Report for Info.xls
Run on 2014-02-04 6:42
The following features in this workbook are not supported by earlier versions of Excel. These features may be lost or degraded when opening this workbook in an earlier version of Excel or if you save this workbook in an earlier file format.
Minor loss of fidelity # of occurrences Version
Some cells or styles in this workbook contain formatting that is not supported by the selected file format. These formats will be converted to the closest format available. 2 Excel 97-2003
I had the following VBA code that was working in Excel 97-2003, but now when I am running that in 2007/2010 it is stopped at:
Set mybar = CommandBars.Add(Name:="PowerBar", Position:=msoBarTop, Temporary:=True)
and producing following compatibility report, any idea how to fix this? there may be other compatibility issue so advise your best.
------------------------
Code:
Public Sub Auto_Open()
Dim Btn1 As CommandBarButton
Dim mybar As CommandBar
'Create a temporary toolbar called PowerBar, this will be available
'while Excel is running once this spreadsheet is opened
'CommandBars("PowerBar").Delete
Set mybar = CommandBars.Add(Name:="PowerBar", Position:=msoBarTop, Temporary:=True)
'.Position = msoBarTop
'Create a button that runs the necessary macro
Set Btn1 = mybar.Controls.Add(Type:=msoControlButton, Temporary:=True)
Btn1.Caption = "Update Info"
Btn1.OnAction = "GetInfo"
Btn1.Style = msoButtonIconAndCaption
Btn1.FaceId = 286
mybar.Visible = True
End Sub
Compatibility Report for Info.xls
Run on 2014-02-04 6:42
The following features in this workbook are not supported by earlier versions of Excel. These features may be lost or degraded when opening this workbook in an earlier version of Excel or if you save this workbook in an earlier file format.
Minor loss of fidelity # of occurrences Version
Some cells or styles in this workbook contain formatting that is not supported by the selected file format. These formats will be converted to the closest format available. 2 Excel 97-2003
Last edited by a moderator: