L
leonidas
Hi,
I have the following macro but it won't work, because, what I think
the backward counting "For i = 10 To 1" doesn't work.
Is there a solution for this problem so it can count backwards o
change the names of the ComboBoxes from 10 to 1 ? Thanks in advance!
Code
-------------------
Sub Test()
Dim ws As Worksheet
Dim i As Long
Set ws = ActiveSheet
For i = 10 To 1
Call LinkCombo(ws.OLEObjects("ComboBox" & i), "ComboBox" & i + 1)
Next i
End Sub
Private Sub LinkCombo(pCombo As OLEObject, pName As String)
With pCombo
.Name = pName
End With
End Su
I have the following macro but it won't work, because, what I think
the backward counting "For i = 10 To 1" doesn't work.
Is there a solution for this problem so it can count backwards o
change the names of the ComboBoxes from 10 to 1 ? Thanks in advance!
Code
-------------------
Sub Test()
Dim ws As Worksheet
Dim i As Long
Set ws = ActiveSheet
For i = 10 To 1
Call LinkCombo(ws.OLEObjects("ComboBox" & i), "ComboBox" & i + 1)
Next i
End Sub
Private Sub LinkCombo(pCombo As OLEObject, pName As String)
With pCombo
.Name = pName
End With
End Su