Trying to set position of listbox on two different computers.I want to use a checkbox to set position between labtop and desktop.
Thinking something is wrong with the way I did IF function.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim ws As Worksheet
Set ws = ActiveSheet
If CheckBox1 = True Then
Me.ListBox1.Value = ""
With ActiveWindow.VisibleRange
ListBox1.Top = .Top + 235
ListBox1.Left = .Left + .Width - ListBox1.Width - 378
End If
Else
Me.ListBox1.Value = ""
With ActiveWindow.VisibleRange
ListBox1.Top = .Top + 35.25
ListBox1.Left = .Left + .Width - ListBox1.Width - 250
End With
End Sub
Bookmarks