I want to align an active x button to the top right corner of cell A1 but not getting it
I can align it to the top let corner with the code below
Is this possible?
Thanks
I can align it to the top let corner with the code below
Is this possible?
Thanks
Code:
[FONT=arial]Sub btnReposition()[/FONT]
[FONT=arial]Dim ws As Worksheet[/FONT]
[FONT=arial]Dim Rng As Range[/FONT]
[FONT=arial]
[/FONT]
[FONT=arial]Set ws = ThisWorkbook.Sheets("Original_<wbr>Data")[/FONT]
[FONT=arial] [/FONT]
[FONT=arial] Set Rng = ws.Range("A1")[/FONT]
[FONT=arial] Columns("A:A").ColumnWidth = 40[/FONT]
[FONT=arial] With ws.OLEObjects("CommandButton1"<wbr>)[/FONT]
[FONT=arial] .Top = Rng.Top[/FONT]
[FONT=arial] .Left = Rng.Left[/FONT]
[FONT=arial] '.Width = rng.Width[/FONT]
[FONT=arial] '.Height = rng.RowHeight[/FONT]
[FONT=arial] End With[/FONT]
[FONT=arial]End Sub[/FONT]