I try to use this code to get the Listbox to line up with some cell , but for some reason it does not hit the target, and then I need to make an currection (See last linie of the Code. when I add the currection it sames to work and stay the with the topleft corner of the ListeBox in the topleft corner of the Cell even if I make change to they will move together
Set xLstBox = ActiveSheet.AddOptLHF6114
If xLstBox.Visible = False Then
xLstBox.Visible = True
Dim iRowHeight As Long
'Add height row height form and to xxx
For j = 1 To 75
iRowHeight = iRowHeight + Rows(j).Height
Next j
'Change Top Position to Total Rows Height
xLstBox.Top = iRowHeight - 17 'Offset to fix the problem this number change
hope you can help
Set xLstBox = ActiveSheet.AddOptLHF6114
If xLstBox.Visible = False Then
xLstBox.Visible = True
Dim iRowHeight As Long
'Add height row height form and to xxx
For j = 1 To 75
iRowHeight = iRowHeight + Rows(j).Height
Next j
'Change Top Position to Total Rows Height
xLstBox.Top = iRowHeight - 17 'Offset to fix the problem this number change
ListBoxNavn | Menu Start after row | Menu Stop at the end of this row | Offset menu |
AddOptInletTable | 57 | 68 | -12 |
AddOptInletTableCombi | 58 | 69 | -12 |
AddOptLHF6114 | 75 | 86 | -17 |
AddOptKL30Special | 28 | 39 | -5 |
AddOptLKS6114 | 94 | 105 | -20 |
hope you can help