This piece of VB code is crucial to my application - unfortunately the OS was changed to XP and now it comes up as an error. Can someone please tell me what needs to be changed to make this work?
Thank you-
-Dan
Sub FixControl(objControl As CommandBarControl)
Dim oC As CommandBarControl, p As Integer
If TypeName(objControl) = "CommandBarPopup" Then
For Each oC In objControl.Controls
FixControl oC 'recursive call
Next oC
Else
p = InStr(objControl.OnAction, "!"
If p > 0 Then objControl.OnAction = Mid(objControl.OnAction, p + 1)
End If
End Sub
Sub FixCustomToolbar(strToolBar As String)
Dim objControl As CommandBarControl
For Each objControl In Application.CommandBars(strToolBar).Controls
FixControl objControl
Next objControl
End Sub
Thank you-
-Dan
Sub FixControl(objControl As CommandBarControl)
Dim oC As CommandBarControl, p As Integer
If TypeName(objControl) = "CommandBarPopup" Then
For Each oC In objControl.Controls
FixControl oC 'recursive call
Next oC
Else
p = InStr(objControl.OnAction, "!"
If p > 0 Then objControl.OnAction = Mid(objControl.OnAction, p + 1)
End If
End Sub
Sub FixCustomToolbar(strToolBar As String)
Dim objControl As CommandBarControl
For Each objControl In Application.CommandBars(strToolBar).Controls
FixControl objControl
Next objControl
End Sub