+ Reply to Thread
Results 1 to 3 of 3

automatically create a spinner and link it when a button is pressed

  1. #1
    Registered User
    Join Date
    05-31-2005
    Posts
    1

    automatically create a spinner and link it when a button is pressed

    For my gcse coursework in ICT i need to create a button which will insert a new row while doing this i need it to create a spinner. i can do this but i am having problems getting it to link it to the cell automatically please help.

  2. #2
    Tom Ogilvy
    Guest

    Re: automatically create a spinner and link it when a button is pressed

    Sub Macro1()
    Dim spn As Spinner
    Dim rng as Range
    Set spn = _
    ActiveSheet.Spinners.Add(265.5, 128.25, 21, 15)
    Set rng = spn.TopLeftCell
    spn.LinkedCell = rng.Address(external:=False)
    End Sub


    --
    Regards,
    Tom Ogilvy


    "jamesleggit" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > For my gcse coursework in ICT i need to create a button which will
    > insert a new row while doing this i need it to create a spinner. i can
    > do this but i am having problems getting it to link it to the cell
    > automatically please help.
    >
    >
    > --
    > jamesleggit
    > ------------------------------------------------------------------------
    > jamesleggit's Profile:

    http://www.excelforum.com/member.php...o&userid=23892
    > View this thread: http://www.excelforum.com/showthread...hreadid=375294
    >




  3. #3
    Registered User
    Join Date
    08-23-2005
    Posts
    4

    Another approach

    While the insertion of a new row is not in this one, you may find a couple of useful aspects in this:

    Sub SpinnerBuilder()
    '
    ' SpinnerBuilder Macro
    ' Macro recorded 8/16/2005 by Nathan
    '

    With ActiveCell.Select
    Col = ActiveCell.Address
    Xloc = ActiveCell.Top
    Yloc = ActiveCell.Left
    CelHeight = ActiveCell.Height
    End With
    '
    ActiveSheet.Spinners.Add(Yloc, Xloc, 9, CelHeight).Select
    With Selection
    .Min = 0
    .Max = 30000
    .SmallChange = 1
    .LinkedCell = Col
    .Display3DShading = True
    .PrintObject = False
    End With
    With ActiveCell.Select
    Selection.ClearContents
    End With
    ActiveCell.Offset(0, 1).Range("A1").Select
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1