In Excel I have created code that, when run, places the custom toolbars in the positions the belong. However if I pull the toolbars of the toolbar field so that it is floating the code still works but the toolbars hover over the place the belong. How do I get them to redock into the toolbar field?
Pertenant code:
For Each Toolbar In Application.Toolbars
iii = iii + 1
MyToolbarName = Toolbar.Name
If MyToolbarName = "" Then
GoTo 5
End If
Xvar = Workbooks("ToolbarTest.xls"
.Sheets("ToolbarControls"
.Cells(1 + iii, 3)
Yvar = Workbooks("ToolbarTest.xls"
.Sheets("ToolbarControls"
.Cells(1 + iii, 4)
Zvar = Workbooks("ToolbarTest.xls"
.Sheets("ToolbarControls"
.Cells(1 + iii, 5)
CommandBars(MyToolbarName).RowIndex = Xvar
CommandBars(MyToolbarName).Left = Yvar
CommandBars(MyToolbarName).Top = Zvar
5 Next
Notes: ToolbarControls is the worksheet with the x,y, and z coordinates of the toolbars
Pertenant code:
For Each Toolbar In Application.Toolbars
iii = iii + 1
MyToolbarName = Toolbar.Name
If MyToolbarName = "" Then
GoTo 5
End If
Xvar = Workbooks("ToolbarTest.xls"
Yvar = Workbooks("ToolbarTest.xls"
Zvar = Workbooks("ToolbarTest.xls"
CommandBars(MyToolbarName).RowIndex = Xvar
CommandBars(MyToolbarName).Left = Yvar
CommandBars(MyToolbarName).Top = Zvar
5 Next
Notes: ToolbarControls is the worksheet with the x,y, and z coordinates of the toolbars