M
Mike
Hi,
cross-platform issue here; I'm using WinXP XL2007 SP2, and a colleague
is using Mac XL2008.
I have an Excel VBProject that
-has ribbon modifications in the xml (from the teachings of Ron
deBruin) (code below),
-is locked from viewing with a password
-has a Selfcert digital signature
-is in a .xlsm workbook that is protected
The code all shows as compiling fine both on my computer and on the
Mac. It works fine on my computer. It works fine on the Mac.
Except...
Everytime Mac XL opens up the file, makes any changes to data on the
worksheet (VB runs during the changes), saves the file, Win XL gets
the "Error, Save/Restart your workbook" kicked out in
RefreshRibbon(). The ribbon routines are all about hiding/showing/
enabling/disabling sections of the ribbon. Mac XL seems to either: 1)
strip off the digital signature or 2) do something to the XML that I
can't figure out
The only changes I've done to Ron's code below is that I put the
entire code section in a conditional compile (#if Mac then #else ....
#end if structure). And the code that calls the RefreshRibbon is also
"#if...#end if" out for Mac
what can I do to enable this code to run successfully on both the Mac
XL and Win XL? and go back and forth between...
I can post more code if it helps
TIA!
Mike.
Ron's code (learned from this article http://msdn.microsoft.com/en-us/library/ee633442(office.11).aspx)
--------------------------------------------------------------
Dim Rib As IRibbonUI
Public MyTag As String
'Callback for customUI.onLoad
Sub RibbonOnLoad(ribbon As IRibbonUI)
Set Rib = ribbon
End Sub
Sub GetVisible(control As IRibbonControl, ByRef visible)
If MyTag = "show" Then
visible = True
Else
If control.Tag Like MyTag Then
visible = True
Else
visible = False
End If
End If
End Sub
Sub RefreshRibbon(Tag As String)
MyTag = Tag
If Rib Is Nothing Then
MsgBox "Error, Save/Restart your workbook"
Else
Rib.Invalidate
End If
End Sub
cross-platform issue here; I'm using WinXP XL2007 SP2, and a colleague
is using Mac XL2008.
I have an Excel VBProject that
-has ribbon modifications in the xml (from the teachings of Ron
deBruin) (code below),
-is locked from viewing with a password
-has a Selfcert digital signature
-is in a .xlsm workbook that is protected
The code all shows as compiling fine both on my computer and on the
Mac. It works fine on my computer. It works fine on the Mac.
Except...
Everytime Mac XL opens up the file, makes any changes to data on the
worksheet (VB runs during the changes), saves the file, Win XL gets
the "Error, Save/Restart your workbook" kicked out in
RefreshRibbon(). The ribbon routines are all about hiding/showing/
enabling/disabling sections of the ribbon. Mac XL seems to either: 1)
strip off the digital signature or 2) do something to the XML that I
can't figure out
The only changes I've done to Ron's code below is that I put the
entire code section in a conditional compile (#if Mac then #else ....
#end if structure). And the code that calls the RefreshRibbon is also
"#if...#end if" out for Mac
what can I do to enable this code to run successfully on both the Mac
XL and Win XL? and go back and forth between...
I can post more code if it helps
TIA!
Mike.
Ron's code (learned from this article http://msdn.microsoft.com/en-us/library/ee633442(office.11).aspx)
--------------------------------------------------------------
Dim Rib As IRibbonUI
Public MyTag As String
'Callback for customUI.onLoad
Sub RibbonOnLoad(ribbon As IRibbonUI)
Set Rib = ribbon
End Sub
Sub GetVisible(control As IRibbonControl, ByRef visible)
If MyTag = "show" Then
visible = True
Else
If control.Tag Like MyTag Then
visible = True
Else
visible = False
End If
End If
End Sub
Sub RefreshRibbon(Tag As String)
MyTag = Tag
If Rib Is Nothing Then
MsgBox "Error, Save/Restart your workbook"
Else
Rib.Invalidate
End If
End Sub