Macro to Move Excel Button

  • Thread starter Thread starter benfalk
  • Start date Start date
B

benfalk

Greetings,

I'm using Excel 2000. I use a particular spreadsheet to keep track of
labor data each week and would like to make macro that will copy a
blank copy of formulas and data and paste it to the bottome of my
exsisting spreadsheet, this part I can do. The part I am having
problems with is this, I made a button that sits off to the side of my
data on this spreadsheet... and what I would like to do is put in the
macro the movement of this button so when a new weeks worth of data
gets copied down to the end of my sheet it moves the button down next
to the new weeks data.

Thanks for any insight,
Benjamin L. Falk
 
To fit CommandButton1 to cell K100:

'------------------------------------------------
Sub tester()
Dim oCB As Object
Set oCB = ActiveSheet.OLEObjects("CommandButton1")
With Range("K100")
oCB.Top = .Top
oCB.Left = .Left
End With
End Sub
'--------------------------------------------------

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top