PC Review


Reply
Thread Tools Rate Thread

Copying spinners for each cell in Excel 2003?

 
 
RCoasterNY
Guest
Posts: n/a
 
      2nd May 2011
I have an inventory tracking sheet that keeps track of my inventory.
I've added in a spinner control to increase/decrease a value in a
certain cell. In my worksheet, the value is located in column E, and
the spinner control is in column F. I have about 200 spinners to add,
and need to fill down the links to it's adjacent cell. I found
something related to checkboxes, but how do I adapt it for the spinner
control? The first value is in E3, and the first spinner is in F3.
 
Reply With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      2nd May 2011
Create 200 spiners in F3:F203 and link to E3:E203

Sub add_spinners_and_links()
Dim myRng As Range
Dim Spnr As Spinner
Dim myCell As Range
Dim wks As Worksheet
Set wks = ActiveSheet
With wks
.Spinners.Delete 'testing purposes
Set myRng = .Range("F3:F203")
End With

For Each myCell In myRng.Cells
With myCell
Set Spnr = .Parent.Spinners.Add _
(Top:=.Top, _
Left:=.Left, _
Width:=.Width, _
Height:=.Height)
Spnr.Name = "Spnr_" & .Address(0, 0)
Spnr.LinkedCell = .Offset(0, -1).Address(external:=True)

End With
Next myCell

End Sub


Gord Dibben MS Excel MVP

On Mon, 2 May 2011 08:13:51 -0700 (PDT), RCoasterNY <(E-Mail Removed)>
wrote:

>I have an inventory tracking sheet that keeps track of my inventory.
>I've added in a spinner control to increase/decrease a value in a
>certain cell. In my worksheet, the value is located in column E, and
>the spinner control is in column F. I have about 200 spinners to add,
>and need to fill down the links to it's adjacent cell. I found
>something related to checkboxes, but how do I adapt it for the spinner
>control? The first value is in E3, and the first spinner is in F3.

 
Reply With Quote
 
RCoasterNY
Guest
Posts: n/a
 
      3rd May 2011
On May 2, 1:50*pm, Gord Dibben <phnor...@shaw.ca> wrote:
> Create 200 spiners in F3:F203 and link to E3:E203
>
> Sub add_spinners_and_links()
> * * Dim myRng As Range
> * * Dim Spnr As Spinner
> * * Dim myCell As Range
> * * Dim wks As Worksheet
> * * Set wks = ActiveSheet
> * * With wks
> * * * * .Spinners.Delete *'testing purposes
> * * * * Set myRng = .Range("F3:F203")
> * * End With
>
> * * For Each myCell In myRng.Cells
> * * * * With myCell
> * * * * * * Set Spnr = .Parent.Spinners.Add _
> * * * * * * * * * * * *(Top:=.Top, _
> * * * * * * * * * * * * Left:=.Left, _
> * * * * * * * * * * * * Width:=.Width, _
> * * * * * * * * * * * * Height:=.Height)
> * * * * * * Spnr.Name = "Spnr_" & .Address(0, 0)
> * * * * * * Spnr.LinkedCell = .Offset(0, -1).Address(external:=True)
>
> * * * * End With
> * * Next myCell
>
> End Sub
>
> Gord Dibben * * MS Excel MVP
>
> On Mon, 2 May 2011 08:13:51 -0700 (PDT), RCoasterNY <rcoaste...@gmail.com>
> wrote:
>
> >I have an inventory tracking sheet that keeps track of my inventory.
> >I've added in a spinner control to increase/decrease a value in a
> >certain cell. In my worksheet, the value is located in column E, and
> >the spinner control is in column F. I have about 200 spinners to add,
> >and need to fill down the links to it's adjacent cell. *I found
> >something related to checkboxes, but how do I adapt it for the spinner
> >control? The first value is in E3, and the first spinner is in F3.


Many thanks!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
copying data from one cell to another in a workbook in Excel 2003 Deb Microsoft Excel Misc 7 23rd Jul 2009 10:06 PM
How do I place a chart on an Excel VBA Userform & drive w/spinners =?Utf-8?B?QnJ1Y2UgQmFkZWF1?= Microsoft Excel Programming 1 21st Aug 2007 01:56 AM
Excel 2003 --> Copying a formula to Paste Special into column cell =?Utf-8?B?RmxvcmVuY2VQUw==?= Microsoft Excel Misc 2 2nd Aug 2007 10:38 PM
Excel---Copying text from one cell a a sheet to another cell on a =?Utf-8?B?UmVlZXp6enk=?= Microsoft Excel Misc 1 19th Oct 2004 03:36 AM
Spinners in Excel 2000 Phil Microsoft Excel Misc 1 14th Jan 2004 12:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:35 AM.