NigelG
2009-01-09 18:47:56 UTC
I've been developing some macros in W03, & would like them to work in
W07 too. Recently a friend running W07 reported the following error
when he tried attaching one of these templates:
<quote>
Run-time error '-2147467259 (80004005)':
Method 'Visible' of object 'CommandBar' failed
</quote>
The relevant section of the AutoNew macro in the VBA is as follows:
With CommandBars("ZipCzech")
.Visible = True
'initialize control buttons
For i = 1 To 4
If i <> 2 Then .Controls(i).State = False
Next i
End With
MsgBox "Ready to type Czech", , "ZipCzech"
End Sub
Does the problem arise from the fact that W07 doesn't recognize
Command Bars? I'd be grateful for any suggestions about a workaround.
Nigel
W07 too. Recently a friend running W07 reported the following error
when he tried attaching one of these templates:
<quote>
Run-time error '-2147467259 (80004005)':
Method 'Visible' of object 'CommandBar' failed
</quote>
The relevant section of the AutoNew macro in the VBA is as follows:
With CommandBars("ZipCzech")
.Visible = True
'initialize control buttons
For i = 1 To 4
If i <> 2 Then .Controls(i).State = False
Next i
End With
MsgBox "Ready to type Czech", , "ZipCzech"
End Sub
Does the problem arise from the fact that W07 doesn't recognize
Command Bars? I'd be grateful for any suggestions about a workaround.
Nigel