Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Tally For Workbook

  Asked By: Phil    Date: Jan 25    Category: MS Office    Views: 518
  

I have a VBA Tally script that was put together for me and works a
treat, except I can't count backwards! I would like to left click
to add and right click to subtract. Here is the selection and tally
scripts currently running:

Sub AddCheckboxes()
On Error Resume Next
Dim c As Range, myRange As Range
Set c = ActiveCell
Set myRange = Selection
For Each c In myRange
ActiveSheet.Shapes.AddShape(msoShapeRectangle, c.Left, c.Top,
c.Width, c.Height). _
Select
With Selection
.ShapeRange.Fill.Visible = msoFalse
.Name = c.Address
.OnAction = "AddTally"
.PrintObject = False ' Remove this line if you want to
print checkboxes
End With
Next
myRange.Select
End Sub
Sub AddTally()
On Error Resume Next
Dim shp As String
shp = Application.Caller
Range(shp).Value = Range(shp).Value + 1
End Sub

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Tally For Workbook Or get search suggestion and latest updates.




Tagged: