Hi everyone,
I found a way of adding a floating command button through googling, but I would like to only assign this to the first 7 columns of the worksheets and have the command button always to the right of the 7th column.
Here is the code I have for now which will put the command button to the right of the active cell. It does not seem to work when I put range into the code.
I am trying to make the command button always appear at the right hand side of the 7th column when the active cell is within the first 7 columns otherwise it will not show up or it would not change its position.
I am not sure if this is achievable.Code:Private Sub Worksheet_SelectionChange(ByVal Target As Range) ActiveSheet.Shapes(1).Left = ActiveCell.Left + ActiveCell.Width + 3 ActiveSheet.Shapes(1).Top = ActiveCell.Top End Sub
Thank you.


Reply With Quote
